aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorFranck Bui-Huu <fbuihuu@gmail.com>2007-06-04 11:46:32 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-07-10 12:32:57 -0400
commitc4612c8596084c898628bd1898da5987ec43ac1d (patch)
tree420fac131c0b1af8cf508ac95e129d73a12c7bda /include/asm-mips
parent09bb9ce15f6e0daba70b7e6978f233ffe2d356eb (diff)
[MIPS] Clean up asm-mips/mach-generic/spaces.h
PAGE_OFFSET definition is now using CAC_BASE by default. This patch also reorder some macros to make them appear in the same order for both 32 and 64 bits configs. It also makes use of const.h generic header file to annotate constants. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/mach-generic/spaces.h65
1 files changed, 27 insertions, 38 deletions
diff --git a/include/asm-mips/mach-generic/spaces.h b/include/asm-mips/mach-generic/spaces.h
index 9a3c521047b8..d901e084a479 100644
--- a/include/asm-mips/mach-generic/spaces.h
+++ b/include/asm-mips/mach-generic/spaces.h
@@ -10,74 +10,56 @@
10#ifndef _ASM_MACH_GENERIC_SPACES_H 10#ifndef _ASM_MACH_GENERIC_SPACES_H
11#define _ASM_MACH_GENERIC_SPACES_H 11#define _ASM_MACH_GENERIC_SPACES_H
12 12
13#include <linux/const.h>
13 14
14#ifdef CONFIG_32BIT 15#ifdef CONFIG_32BIT
15 16
16#define CAC_BASE 0x80000000 17#define CAC_BASE _AC(0x80000000, UL)
17#define IO_BASE 0xa0000000 18#define IO_BASE _AC(0xa0000000, UL)
18#define UNCAC_BASE 0xa0000000 19#define UNCAC_BASE _AC(0xa0000000, UL)
19 20
20#ifndef MAP_BASE 21#ifndef MAP_BASE
21#define MAP_BASE 0xc0000000 22#define MAP_BASE _AC(0xc0000000, UL)
22#endif
23
24/*
25 * This handles the memory map.
26 * We handle pages at KSEG0 for kernels with 32 bit address space.
27 */
28#ifndef PAGE_OFFSET
29#define PAGE_OFFSET 0x80000000UL
30#endif 23#endif
31 24
32/* 25/*
33 * Memory above this physical address will be considered highmem. 26 * Memory above this physical address will be considered highmem.
34 */ 27 */
35#ifndef HIGHMEM_START 28#ifndef HIGHMEM_START
36#define HIGHMEM_START 0x20000000UL 29#define HIGHMEM_START _AC(0x20000000, UL)
37#endif 30#endif
38 31
39#endif /* CONFIG_32BIT */ 32#endif /* CONFIG_32BIT */
40 33
41#ifdef CONFIG_64BIT 34#ifdef CONFIG_64BIT
42 35
43/*
44 * This handles the memory map.
45 */
46#ifndef PAGE_OFFSET
47#ifdef CONFIG_DMA_NONCOHERENT
48#define PAGE_OFFSET 0x9800000000000000UL
49#else
50#define PAGE_OFFSET 0xa800000000000000UL
51#endif
52#endif
53
54/*
55 * Memory above this physical address will be considered highmem.
56 * Fixme: 59 bits is a fictive number and makes assumptions about processors
57 * in the distant future. Nobody will care for a few years :-)
58 */
59#ifndef HIGHMEM_START
60#define HIGHMEM_START (1UL << 59UL)
61#endif
62
63#ifndef CAC_BASE 36#ifndef CAC_BASE
64#ifdef CONFIG_DMA_NONCOHERENT 37#ifdef CONFIG_DMA_NONCOHERENT
65#define CAC_BASE 0x9800000000000000UL 38#define CAC_BASE _AC(0x9800000000000000, UL)
66#else 39#else
67#define CAC_BASE 0xa800000000000000UL 40#define CAC_BASE _AC(0xa800000000000000, UL)
68#endif 41#endif
69#endif 42#endif
70 43
71#ifndef IO_BASE 44#ifndef IO_BASE
72#define IO_BASE 0x9000000000000000UL 45#define IO_BASE _AC(0x9000000000000000, UL)
73#endif 46#endif
74 47
75#ifndef UNCAC_BASE 48#ifndef UNCAC_BASE
76#define UNCAC_BASE 0x9000000000000000UL 49#define UNCAC_BASE _AC(0x9000000000000000, UL)
77#endif 50#endif
78 51
79#ifndef MAP_BASE 52#ifndef MAP_BASE
80#define MAP_BASE 0xc000000000000000UL 53#define MAP_BASE _AC(0xc000000000000000, UL)
54#endif
55
56/*
57 * Memory above this physical address will be considered highmem.
58 * Fixme: 59 bits is a fictive number and makes assumptions about processors
59 * in the distant future. Nobody will care for a few years :-)
60 */
61#ifndef HIGHMEM_START
62#define HIGHMEM_START (_AC(1, UL) << _AC(59, UL))
81#endif 63#endif
82 64
83#define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) 65#define TO_PHYS(x) ( ((x) & TO_PHYS_MASK))
@@ -86,4 +68,11 @@
86 68
87#endif /* CONFIG_64BIT */ 69#endif /* CONFIG_64BIT */
88 70
71/*
72 * This handles the memory map.
73 */
74#ifndef PAGE_OFFSET
75#define PAGE_OFFSET CAC_BASE
76#endif
77
89#endif /* __ASM_MACH_GENERIC_SPACES_H */ 78#endif /* __ASM_MACH_GENERIC_SPACES_H */