aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-09-03 18:56:16 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:06 -0400
commit875d43e72b5bf22161a81de7554f88eccf8a51ae (patch)
treea676fe7298b478b7ee9fe7be9cb07c9a0b928370 /include/asm-mips
parent63fb6fd1c86181d9dd9ba0e6e6082799e149b56b (diff)
[PATCH] mips: clean up 32/64-bit configuration
Start cleaning 32-bit vs. 64-bit configuration. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/a.out.h4
-rw-r--r--include/asm-mips/addrspace.h2
-rw-r--r--include/asm-mips/asmmacro.h4
-rw-r--r--include/asm-mips/atomic.h4
-rw-r--r--include/asm-mips/bitops.h8
-rw-r--r--include/asm-mips/bugs.h2
-rw-r--r--include/asm-mips/checksum.h4
-rw-r--r--include/asm-mips/cpu-features.h4
-rw-r--r--include/asm-mips/dec/prom.h12
-rw-r--r--include/asm-mips/delay.h6
-rw-r--r--include/asm-mips/elf.h16
-rw-r--r--include/asm-mips/local.h4
-rw-r--r--include/asm-mips/mach-generic/spaces.h8
-rw-r--r--include/asm-mips/mach-ip22/spaces.h8
-rw-r--r--include/asm-mips/mach-ip32/cpu-feature-overrides.h2
-rw-r--r--include/asm-mips/mmu_context.h6
-rw-r--r--include/asm-mips/module.h4
-rw-r--r--include/asm-mips/msgbuf.h12
-rw-r--r--include/asm-mips/paccess.h4
-rw-r--r--include/asm-mips/pgalloc.h4
-rw-r--r--include/asm-mips/pgtable.h4
-rw-r--r--include/asm-mips/processor.h4
-rw-r--r--include/asm-mips/ptrace.h2
-rw-r--r--include/asm-mips/reg.h6
-rw-r--r--include/asm-mips/resource.h2
-rw-r--r--include/asm-mips/sgiarcs.h8
-rw-r--r--include/asm-mips/siginfo.h4
-rw-r--r--include/asm-mips/sim.h8
-rw-r--r--include/asm-mips/stackframe.h22
-rw-r--r--include/asm-mips/string.h8
-rw-r--r--include/asm-mips/system.h4
-rw-r--r--include/asm-mips/thread_info.h4
-rw-r--r--include/asm-mips/types.h2
-rw-r--r--include/asm-mips/uaccess.h8
-rw-r--r--include/asm-mips/unistd.h2
35 files changed, 103 insertions, 103 deletions
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h
index e42b3093e903..2b3dc3bed4da 100644
--- a/include/asm-mips/a.out.h
+++ b/include/asm-mips/a.out.h
@@ -35,10 +35,10 @@ struct exec
35 35
36#ifdef __KERNEL__ 36#ifdef __KERNEL__
37 37
38#ifdef CONFIG_MIPS32 38#ifdef CONFIG_32BIT
39#define STACK_TOP TASK_SIZE 39#define STACK_TOP TASK_SIZE
40#endif 40#endif
41#ifdef CONFIG_MIPS64 41#ifdef CONFIG_64BIT
42#define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) 42#define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE)
43#endif 43#endif
44 44
diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
index 2caa8c427204..7dc2619f5006 100644
--- a/include/asm-mips/addrspace.h
+++ b/include/asm-mips/addrspace.h
@@ -48,7 +48,7 @@
48#define CPHYSADDR(a) ((_ACAST32_ (a)) & 0x1fffffff) 48#define CPHYSADDR(a) ((_ACAST32_ (a)) & 0x1fffffff)
49#define XPHYSADDR(a) ((_ACAST64_ (a)) & 0x000000ffffffffff) 49#define XPHYSADDR(a) ((_ACAST64_ (a)) & 0x000000ffffffffff)
50 50
51#ifdef CONFIG_MIPS64 51#ifdef CONFIG_64BIT
52 52
53/* 53/*
54 * Memory segments (64bit kernel mode addresses) 54 * Memory segments (64bit kernel mode addresses)
diff --git a/include/asm-mips/asmmacro.h b/include/asm-mips/asmmacro.h
index 37a460aa0378..40ceedcf454e 100644
--- a/include/asm-mips/asmmacro.h
+++ b/include/asm-mips/asmmacro.h
@@ -11,10 +11,10 @@
11#include <linux/config.h> 11#include <linux/config.h>
12#include <asm/hazards.h> 12#include <asm/hazards.h>
13 13
14#ifdef CONFIG_MIPS32 14#ifdef CONFIG_32BIT
15#include <asm/asmmacro-32.h> 15#include <asm/asmmacro-32.h>
16#endif 16#endif
17#ifdef CONFIG_MIPS64 17#ifdef CONFIG_64BIT
18#include <asm/asmmacro-64.h> 18#include <asm/asmmacro-64.h>
19#endif 19#endif
20 20
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h
index 7d89e87bc8c6..c0bd8d014e14 100644
--- a/include/asm-mips/atomic.h
+++ b/include/asm-mips/atomic.h
@@ -334,7 +334,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
334 */ 334 */
335#define atomic_add_negative(i,v) (atomic_add_return(i, (v)) < 0) 335#define atomic_add_negative(i,v) (atomic_add_return(i, (v)) < 0)
336 336
337#ifdef CONFIG_MIPS64 337#ifdef CONFIG_64BIT
338 338
339typedef struct { volatile __s64 counter; } atomic64_t; 339typedef struct { volatile __s64 counter; } atomic64_t;
340 340
@@ -639,7 +639,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
639 */ 639 */
640#define atomic64_add_negative(i,v) (atomic64_add_return(i, (v)) < 0) 640#define atomic64_add_negative(i,v) (atomic64_add_return(i, (v)) < 0)
641 641
642#endif /* CONFIG_MIPS64 */ 642#endif /* CONFIG_64BIT */
643 643
644/* 644/*
645 * atomic*_return operations are serializing but not the non-*_return 645 * atomic*_return operations are serializing but not the non-*_return
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 779d2187a6a4..bc136dcfdbe6 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -533,14 +533,14 @@ static inline unsigned long ffz(unsigned long word)
533 int b = 0, s; 533 int b = 0, s;
534 534
535 word = ~word; 535 word = ~word;
536#ifdef CONFIG_MIPS32 536#ifdef CONFIG_32BIT
537 s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s; 537 s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s;
538 s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s; 538 s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s;
539 s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s; 539 s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s;
540 s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s; 540 s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s;
541 s = 1; if (word << 31 != 0) s = 0; b += s; 541 s = 1; if (word << 31 != 0) s = 0; b += s;
542#endif 542#endif
543#ifdef CONFIG_MIPS64 543#ifdef CONFIG_64BIT
544 s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s; 544 s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s;
545 s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s; 545 s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s;
546 s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s; 546 s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s;
@@ -683,7 +683,7 @@ found_middle:
683 */ 683 */
684static inline int sched_find_first_bit(const unsigned long *b) 684static inline int sched_find_first_bit(const unsigned long *b)
685{ 685{
686#ifdef CONFIG_MIPS32 686#ifdef CONFIG_32BIT
687 if (unlikely(b[0])) 687 if (unlikely(b[0]))
688 return __ffs(b[0]); 688 return __ffs(b[0]);
689 if (unlikely(b[1])) 689 if (unlikely(b[1]))
@@ -694,7 +694,7 @@ static inline int sched_find_first_bit(const unsigned long *b)
694 return __ffs(b[3]) + 96; 694 return __ffs(b[3]) + 96;
695 return __ffs(b[4]) + 128; 695 return __ffs(b[4]) + 128;
696#endif 696#endif
697#ifdef CONFIG_MIPS64 697#ifdef CONFIG_64BIT
698 if (unlikely(b[0])) 698 if (unlikely(b[0]))
699 return __ffs(b[0]); 699 return __ffs(b[0]);
700 if (unlikely(b[1])) 700 if (unlikely(b[1]))
diff --git a/include/asm-mips/bugs.h b/include/asm-mips/bugs.h
index 18cced19cca4..b14b961c2100 100644
--- a/include/asm-mips/bugs.h
+++ b/include/asm-mips/bugs.h
@@ -15,7 +15,7 @@ extern void check_bugs64(void);
15static inline void check_bugs(void) 15static inline void check_bugs(void)
16{ 16{
17 check_bugs32(); 17 check_bugs32();
18#ifdef CONFIG_MIPS64 18#ifdef CONFIG_64BIT
19 check_bugs64(); 19 check_bugs64();
20#endif 20#endif
21} 21}
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h
index c25cc92b9950..c1ea5a8714f3 100644
--- a/include/asm-mips/checksum.h
+++ b/include/asm-mips/checksum.h
@@ -128,7 +128,7 @@ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr,
128{ 128{
129 __asm__( 129 __asm__(
130 ".set\tnoat\t\t\t# csum_tcpudp_nofold\n\t" 130 ".set\tnoat\t\t\t# csum_tcpudp_nofold\n\t"
131#ifdef CONFIG_MIPS32 131#ifdef CONFIG_32BIT
132 "addu\t%0, %2\n\t" 132 "addu\t%0, %2\n\t"
133 "sltu\t$1, %0, %2\n\t" 133 "sltu\t$1, %0, %2\n\t"
134 "addu\t%0, $1\n\t" 134 "addu\t%0, $1\n\t"
@@ -141,7 +141,7 @@ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr,
141 "sltu\t$1, %0, %4\n\t" 141 "sltu\t$1, %0, %4\n\t"
142 "addu\t%0, $1\n\t" 142 "addu\t%0, $1\n\t"
143#endif 143#endif
144#ifdef CONFIG_MIPS64 144#ifdef CONFIG_64BIT
145 "daddu\t%0, %2\n\t" 145 "daddu\t%0, %2\n\t"
146 "daddu\t%0, %3\n\t" 146 "daddu\t%0, %3\n\t"
147 "daddu\t%0, %4\n\t" 147 "daddu\t%0, %4\n\t"
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h
index 1df2c299de82..9a2de642eee6 100644
--- a/include/asm-mips/cpu-features.h
+++ b/include/asm-mips/cpu-features.h
@@ -106,7 +106,7 @@
106#define PLAT_TRAMPOLINE_STUFF_LINE 0UL 106#define PLAT_TRAMPOLINE_STUFF_LINE 0UL
107#endif 107#endif
108 108
109#ifdef CONFIG_MIPS32 109#ifdef CONFIG_32BIT
110# ifndef cpu_has_nofpuex 110# ifndef cpu_has_nofpuex
111# define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX) 111# define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX)
112# endif 112# endif
@@ -124,7 +124,7 @@
124# endif 124# endif
125#endif 125#endif
126 126
127#ifdef CONFIG_MIPS64 127#ifdef CONFIG_64BIT
128# ifndef cpu_has_nofpuex 128# ifndef cpu_has_nofpuex
129# define cpu_has_nofpuex 0 129# define cpu_has_nofpuex 0
130# endif 130# endif
diff --git a/include/asm-mips/dec/prom.h b/include/asm-mips/dec/prom.h
index b63e2f2317d1..a05d6d3395fe 100644
--- a/include/asm-mips/dec/prom.h
+++ b/include/asm-mips/dec/prom.h
@@ -48,15 +48,15 @@
48 */ 48 */
49#define REX_PROM_MAGIC 0x30464354 49#define REX_PROM_MAGIC 0x30464354
50 50
51#ifdef CONFIG_MIPS64 51#ifdef CONFIG_64BIT
52 52
53#define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ 53#define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */
54 54
55#else /* !CONFIG_MIPS64 */ 55#else /* !CONFIG_64BIT */
56 56
57#define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC) 57#define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC)
58 58
59#endif /* !CONFIG_MIPS64 */ 59#endif /* !CONFIG_64BIT */
60 60
61 61
62/* 62/*
@@ -105,7 +105,7 @@ extern int (*__pmax_read)(int, void *, int);
105extern int (*__pmax_close)(int); 105extern int (*__pmax_close)(int);
106 106
107 107
108#ifdef CONFIG_MIPS64 108#ifdef CONFIG_64BIT
109 109
110/* 110/*
111 * On MIPS64 we have to call PROM functions via a helper 111 * On MIPS64 we have to call PROM functions via a helper
@@ -138,7 +138,7 @@ int _prom_printf(int (*)(char *, ...), char *, ...) __DEC_PROM_O32;
138#define prom_getenv(x) _prom_getenv(__prom_getenv, x) 138#define prom_getenv(x) _prom_getenv(__prom_getenv, x)
139#define prom_printf(x...) _prom_printf(__prom_printf, x) 139#define prom_printf(x...) _prom_printf(__prom_printf, x)
140 140
141#else /* !CONFIG_MIPS64 */ 141#else /* !CONFIG_64BIT */
142 142
143/* 143/*
144 * On plain MIPS we just call PROM functions directly. 144 * On plain MIPS we just call PROM functions directly.
@@ -160,7 +160,7 @@ int _prom_printf(int (*)(char *, ...), char *, ...) __DEC_PROM_O32;
160#define pmax_read __pmax_read 160#define pmax_read __pmax_read
161#define pmax_close __pmax_close 161#define pmax_close __pmax_close
162 162
163#endif /* !CONFIG_MIPS64 */ 163#endif /* !CONFIG_64BIT */
164 164
165 165
166extern void prom_meminit(u32); 166extern void prom_meminit(u32);
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h
index d0f68447e5a7..a606dbee0412 100644
--- a/include/asm-mips/delay.h
+++ b/include/asm-mips/delay.h
@@ -57,11 +57,11 @@ static inline void __udelay(unsigned long usecs, unsigned long lpj)
57 * The common rates of 1000 and 128 are rounded wrongly by the 57 * The common rates of 1000 and 128 are rounded wrongly by the
58 * catchall case for 64-bit. Excessive precission? Probably ... 58 * catchall case for 64-bit. Excessive precission? Probably ...
59 */ 59 */
60#if defined(CONFIG_MIPS64) && (HZ == 128) 60#if defined(CONFIG_64BIT) && (HZ == 128)
61 usecs *= 0x0008637bd05af6c7UL; /* 2**64 / (1000000 / HZ) */ 61 usecs *= 0x0008637bd05af6c7UL; /* 2**64 / (1000000 / HZ) */
62#elif defined(CONFIG_MIPS64) && (HZ == 1000) 62#elif defined(CONFIG_64BIT) && (HZ == 1000)
63 usecs *= 0x004189374BC6A7f0UL; /* 2**64 / (1000000 / HZ) */ 63 usecs *= 0x004189374BC6A7f0UL; /* 2**64 / (1000000 / HZ) */
64#elif defined(CONFIG_MIPS64) 64#elif defined(CONFIG_64BIT)
65 usecs *= (0x8000000000000000UL / (500000 / HZ)); 65 usecs *= (0x8000000000000000UL / (500000 / HZ));
66#else /* 32-bit junk follows here */ 66#else /* 32-bit junk follows here */
67 usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) + 67 usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) +
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h
index 7b92c8045cc2..e48811440015 100644
--- a/include/asm-mips/elf.h
+++ b/include/asm-mips/elf.h
@@ -125,7 +125,7 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
125typedef double elf_fpreg_t; 125typedef double elf_fpreg_t;
126typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; 126typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
127 127
128#ifdef CONFIG_MIPS32 128#ifdef CONFIG_32BIT
129 129
130/* 130/*
131 * This is used to ensure we don't load something for the wrong architecture. 131 * This is used to ensure we don't load something for the wrong architecture.
@@ -153,9 +153,9 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
153 */ 153 */
154#define ELF_CLASS ELFCLASS32 154#define ELF_CLASS ELFCLASS32
155 155
156#endif /* CONFIG_MIPS32 */ 156#endif /* CONFIG_32BIT */
157 157
158#ifdef CONFIG_MIPS64 158#ifdef CONFIG_64BIT
159/* 159/*
160 * This is used to ensure we don't load something for the wrong architecture. 160 * This is used to ensure we don't load something for the wrong architecture.
161 */ 161 */
@@ -177,7 +177,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
177 */ 177 */
178#define ELF_CLASS ELFCLASS64 178#define ELF_CLASS ELFCLASS64
179 179
180#endif /* CONFIG_MIPS64 */ 180#endif /* CONFIG_64BIT */
181 181
182/* 182/*
183 * These are used to set parameters in the core dumps. 183 * These are used to set parameters in the core dumps.
@@ -193,7 +193,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
193 193
194#ifdef __KERNEL__ 194#ifdef __KERNEL__
195 195
196#ifdef CONFIG_MIPS32 196#ifdef CONFIG_32BIT
197 197
198#define SET_PERSONALITY(ex, ibcs2) \ 198#define SET_PERSONALITY(ex, ibcs2) \
199do { \ 199do { \
@@ -202,9 +202,9 @@ do { \
202 set_personality(PER_LINUX); \ 202 set_personality(PER_LINUX); \
203} while (0) 203} while (0)
204 204
205#endif /* CONFIG_MIPS32 */ 205#endif /* CONFIG_32BIT */
206 206
207#ifdef CONFIG_MIPS64 207#ifdef CONFIG_64BIT
208 208
209#define SET_PERSONALITY(ex, ibcs2) \ 209#define SET_PERSONALITY(ex, ibcs2) \
210do { current->thread.mflags &= ~MF_ABI_MASK; \ 210do { current->thread.mflags &= ~MF_ABI_MASK; \
@@ -222,7 +222,7 @@ do { current->thread.mflags &= ~MF_ABI_MASK; \
222 set_personality(PER_LINUX); \ 222 set_personality(PER_LINUX); \
223} while (0) 223} while (0)
224 224
225#endif /* CONFIG_MIPS64 */ 225#endif /* CONFIG_64BIT */
226 226
227extern void dump_regs(elf_greg_t *, struct pt_regs *regs); 227extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
228extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); 228extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
diff --git a/include/asm-mips/local.h b/include/asm-mips/local.h
index 7eb6bf661b80..c38844f615fc 100644
--- a/include/asm-mips/local.h
+++ b/include/asm-mips/local.h
@@ -5,7 +5,7 @@
5#include <linux/percpu.h> 5#include <linux/percpu.h>
6#include <asm/atomic.h> 6#include <asm/atomic.h>
7 7
8#ifdef CONFIG_MIPS32 8#ifdef CONFIG_32BIT
9 9
10typedef atomic_t local_t; 10typedef atomic_t local_t;
11 11
@@ -20,7 +20,7 @@ typedef atomic_t local_t;
20 20
21#endif 21#endif
22 22
23#ifdef CONFIG_MIPS64 23#ifdef CONFIG_64BIT
24 24
25typedef atomic64_t local_t; 25typedef atomic64_t local_t;
26 26
diff --git a/include/asm-mips/mach-generic/spaces.h b/include/asm-mips/mach-generic/spaces.h
index 63c0a81c7832..5a2c1efb4eb7 100644
--- a/include/asm-mips/mach-generic/spaces.h
+++ b/include/asm-mips/mach-generic/spaces.h
@@ -12,7 +12,7 @@
12 12
13#include <linux/config.h> 13#include <linux/config.h>
14 14
15#ifdef CONFIG_MIPS32 15#ifdef CONFIG_32BIT
16 16
17#define CAC_BASE 0x80000000 17#define CAC_BASE 0x80000000
18#define IO_BASE 0xa0000000 18#define IO_BASE 0xa0000000
@@ -32,9 +32,9 @@
32#define HIGHMEM_START 0x20000000UL 32#define HIGHMEM_START 0x20000000UL
33#endif 33#endif
34 34
35#endif /* CONFIG_MIPS32 */ 35#endif /* CONFIG_32BIT */
36 36
37#ifdef CONFIG_MIPS64 37#ifdef CONFIG_64BIT
38 38
39/* 39/*
40 * This handles the memory map. 40 * This handles the memory map.
@@ -67,6 +67,6 @@
67#define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) 67#define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
68#define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) 68#define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
69 69
70#endif /* CONFIG_MIPS64 */ 70#endif /* CONFIG_64BIT */
71 71
72#endif /* __ASM_MACH_GENERIC_SPACES_H */ 72#endif /* __ASM_MACH_GENERIC_SPACES_H */
diff --git a/include/asm-mips/mach-ip22/spaces.h b/include/asm-mips/mach-ip22/spaces.h
index 30d42fcafe3d..e96166f27c49 100644
--- a/include/asm-mips/mach-ip22/spaces.h
+++ b/include/asm-mips/mach-ip22/spaces.h
@@ -12,7 +12,7 @@
12 12
13#include <linux/config.h> 13#include <linux/config.h>
14 14
15#ifdef CONFIG_MIPS32 15#ifdef CONFIG_32BIT
16 16
17#define CAC_BASE 0x80000000 17#define CAC_BASE 0x80000000
18#define IO_BASE 0xa0000000 18#define IO_BASE 0xa0000000
@@ -32,9 +32,9 @@
32#define HIGHMEM_START 0x20000000UL 32#define HIGHMEM_START 0x20000000UL
33#endif 33#endif
34 34
35#endif /* CONFIG_MIPS32 */ 35#endif /* CONFIG_32BIT */
36 36
37#ifdef CONFIG_MIPS64 37#ifdef CONFIG_64BIT
38#define PAGE_OFFSET 0xffffffff80000000UL 38#define PAGE_OFFSET 0xffffffff80000000UL
39 39
40#ifndef HIGHMEM_START 40#ifndef HIGHMEM_START
@@ -50,6 +50,6 @@
50#define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) 50#define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
51#define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) 51#define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
52 52
53#endif /* CONFIG_MIPS64 */ 53#endif /* CONFIG_64BIT */
54 54
55#endif /* __ASM_MACH_IP22_SPACES_H */ 55#endif /* __ASM_MACH_IP22_SPACES_H */
diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h
index b932237f2193..04713973c6c3 100644
--- a/include/asm-mips/mach-ip32/cpu-feature-overrides.h
+++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h
@@ -18,7 +18,7 @@
18 * so, for 64bit IP32 kernel we just don't use ll/sc. 18 * so, for 64bit IP32 kernel we just don't use ll/sc.
19 * This does not affect luserland. 19 * This does not affect luserland.
20 */ 20 */
21#if defined(CONFIG_CPU_R5000) && defined(CONFIG_MIPS64) 21#if defined(CONFIG_CPU_R5000) && defined(CONFIG_64BIT)
22#define cpu_has_llsc 0 22#define cpu_has_llsc 0
23#else 23#else
24#define cpu_has_llsc 1 24#define cpu_has_llsc 1
diff --git a/include/asm-mips/mmu_context.h b/include/asm-mips/mmu_context.h
index 48b77c9fb4f2..45cd72d172e8 100644
--- a/include/asm-mips/mmu_context.h
+++ b/include/asm-mips/mmu_context.h
@@ -28,17 +28,17 @@ extern unsigned long pgd_current[];
28#define TLBMISS_HANDLER_SETUP_PGD(pgd) \ 28#define TLBMISS_HANDLER_SETUP_PGD(pgd) \
29 pgd_current[smp_processor_id()] = (unsigned long)(pgd) 29 pgd_current[smp_processor_id()] = (unsigned long)(pgd)
30 30
31#ifdef CONFIG_MIPS32 31#ifdef CONFIG_32BIT
32#define TLBMISS_HANDLER_SETUP() \ 32#define TLBMISS_HANDLER_SETUP() \
33 write_c0_context((unsigned long) smp_processor_id() << 23); \ 33 write_c0_context((unsigned long) smp_processor_id() << 23); \
34 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) 34 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
35#endif 35#endif
36#if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) 36#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
37#define TLBMISS_HANDLER_SETUP() \ 37#define TLBMISS_HANDLER_SETUP() \
38 write_c0_context((unsigned long) &pgd_current[smp_processor_id()] << 23); \ 38 write_c0_context((unsigned long) &pgd_current[smp_processor_id()] << 23); \
39 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) 39 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
40#endif 40#endif
41#if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) 41#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
42#define TLBMISS_HANDLER_SETUP() \ 42#define TLBMISS_HANDLER_SETUP() \
43 write_c0_context((unsigned long) smp_processor_id() << 23); \ 43 write_c0_context((unsigned long) smp_processor_id() << 23); \
44 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) 44 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
diff --git a/include/asm-mips/module.h b/include/asm-mips/module.h
index 90ee24aad955..0be58b2aeb9f 100644
--- a/include/asm-mips/module.h
+++ b/include/asm-mips/module.h
@@ -25,7 +25,7 @@ typedef struct
25 Elf64_Sxword r_addend; /* Addend. */ 25 Elf64_Sxword r_addend; /* Addend. */
26} Elf64_Mips_Rela; 26} Elf64_Mips_Rela;
27 27
28#ifdef CONFIG_MIPS32 28#ifdef CONFIG_32BIT
29 29
30#define Elf_Shdr Elf32_Shdr 30#define Elf_Shdr Elf32_Shdr
31#define Elf_Sym Elf32_Sym 31#define Elf_Sym Elf32_Sym
@@ -33,7 +33,7 @@ typedef struct
33 33
34#endif 34#endif
35 35
36#ifdef CONFIG_MIPS64 36#ifdef CONFIG_64BIT
37 37
38#define Elf_Shdr Elf64_Shdr 38#define Elf_Shdr Elf64_Shdr
39#define Elf_Sym Elf64_Sym 39#define Elf_Sym Elf64_Sym
diff --git a/include/asm-mips/msgbuf.h b/include/asm-mips/msgbuf.h
index 513b2824838b..a1533959742e 100644
--- a/include/asm-mips/msgbuf.h
+++ b/include/asm-mips/msgbuf.h
@@ -15,25 +15,25 @@
15 15
16struct msqid64_ds { 16struct msqid64_ds {
17 struct ipc64_perm msg_perm; 17 struct ipc64_perm msg_perm;
18#if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) 18#if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN)
19 unsigned long __unused1; 19 unsigned long __unused1;
20#endif 20#endif
21 __kernel_time_t msg_stime; /* last msgsnd time */ 21 __kernel_time_t msg_stime; /* last msgsnd time */
22#if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) 22#if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN)
23 unsigned long __unused1; 23 unsigned long __unused1;
24#endif 24#endif
25#if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) 25#if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN)
26 unsigned long __unused2; 26 unsigned long __unused2;
27#endif 27#endif
28 __kernel_time_t msg_rtime; /* last msgrcv time */ 28 __kernel_time_t msg_rtime; /* last msgrcv time */
29#if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) 29#if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN)
30 unsigned long __unused2; 30 unsigned long __unused2;
31#endif 31#endif
32#if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) 32#if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN)
33 unsigned long __unused3; 33 unsigned long __unused3;
34#endif 34#endif
35 __kernel_time_t msg_ctime; /* last change time */ 35 __kernel_time_t msg_ctime; /* last change time */
36#if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) 36#if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN)
37 unsigned long __unused3; 37 unsigned long __unused3;
38#endif 38#endif
39 unsigned long msg_cbytes; /* current number of bytes on queue */ 39 unsigned long msg_cbytes; /* current number of bytes on queue */
diff --git a/include/asm-mips/paccess.h b/include/asm-mips/paccess.h
index 36cec9e31696..309bc3099f68 100644
--- a/include/asm-mips/paccess.h
+++ b/include/asm-mips/paccess.h
@@ -16,10 +16,10 @@
16#include <linux/config.h> 16#include <linux/config.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18 18
19#ifdef CONFIG_MIPS32 19#ifdef CONFIG_32BIT
20#define __PA_ADDR ".word" 20#define __PA_ADDR ".word"
21#endif 21#endif
22#ifdef CONFIG_MIPS64 22#ifdef CONFIG_64BIT
23#define __PA_ADDR ".dword" 23#define __PA_ADDR ".dword"
24#endif 24#endif
25 25
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h
index 2d63f5ba403f..ce57288d43bd 100644
--- a/include/asm-mips/pgalloc.h
+++ b/include/asm-mips/pgalloc.h
@@ -85,7 +85,7 @@ static inline void pte_free(struct page *pte)
85 85
86#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) 86#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
87 87
88#ifdef CONFIG_MIPS32 88#ifdef CONFIG_32BIT
89#define pgd_populate(mm, pmd, pte) BUG() 89#define pgd_populate(mm, pmd, pte) BUG()
90 90
91/* 91/*
@@ -97,7 +97,7 @@ static inline void pte_free(struct page *pte)
97#define __pmd_free_tlb(tlb,x) do { } while (0) 97#define __pmd_free_tlb(tlb,x) do { } while (0)
98#endif 98#endif
99 99
100#ifdef CONFIG_MIPS64 100#ifdef CONFIG_64BIT
101 101
102#define pgd_populate(mm, pgd, pmd) set_pgd(pgd, __pgd(pmd)) 102#define pgd_populate(mm, pgd, pmd) set_pgd(pgd, __pgd(pmd))
103 103
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index e76ccd6e3a5d..dbe13da0bdad 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -11,10 +11,10 @@
11#include <asm-generic/4level-fixup.h> 11#include <asm-generic/4level-fixup.h>
12 12
13#include <linux/config.h> 13#include <linux/config.h>
14#ifdef CONFIG_MIPS32 14#ifdef CONFIG_32BIT
15#include <asm/pgtable-32.h> 15#include <asm/pgtable-32.h>
16#endif 16#endif
17#ifdef CONFIG_MIPS64 17#ifdef CONFIG_64BIT
18#include <asm/pgtable-64.h> 18#include <asm/pgtable-64.h>
19#endif 19#endif
20 20
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h
index 13c54d5b3b48..d6466aa09fb7 100644
--- a/include/asm-mips/processor.h
+++ b/include/asm-mips/processor.h
@@ -33,7 +33,7 @@ extern void (*cpu_wait)(void);
33 33
34extern unsigned int vced_count, vcei_count; 34extern unsigned int vced_count, vcei_count;
35 35
36#ifdef CONFIG_MIPS32 36#ifdef CONFIG_32BIT
37/* 37/*
38 * User space process size: 2GB. This is hardcoded into a few places, 38 * User space process size: 2GB. This is hardcoded into a few places,
39 * so don't change it unless you know what you are doing. 39 * so don't change it unless you know what you are doing.
@@ -47,7 +47,7 @@ extern unsigned int vced_count, vcei_count;
47#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) 47#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
48#endif 48#endif
49 49
50#ifdef CONFIG_MIPS64 50#ifdef CONFIG_64BIT
51/* 51/*
52 * User space process size: 1TB. This is hardcoded into a few places, 52 * User space process size: 1TB. This is hardcoded into a few places,
53 * so don't change it unless you know what you are doing. TASK_SIZE 53 * so don't change it unless you know what you are doing. TASK_SIZE
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h
index d3c46d633826..2b5c624c3d4f 100644
--- a/include/asm-mips/ptrace.h
+++ b/include/asm-mips/ptrace.h
@@ -28,7 +28,7 @@
28 * system call/exception. As usual the registers k0/k1 aren't being saved. 28 * system call/exception. As usual the registers k0/k1 aren't being saved.
29 */ 29 */
30struct pt_regs { 30struct pt_regs {
31#ifdef CONFIG_MIPS32 31#ifdef CONFIG_32BIT
32 /* Pad bytes for argument save space on the stack. */ 32 /* Pad bytes for argument save space on the stack. */
33 unsigned long pad0[6]; 33 unsigned long pad0[6];
34#endif 34#endif
diff --git a/include/asm-mips/reg.h b/include/asm-mips/reg.h
index 7b33bbca9585..a1ebd3aa93af 100644
--- a/include/asm-mips/reg.h
+++ b/include/asm-mips/reg.h
@@ -14,7 +14,7 @@
14 14
15#include <linux/config.h> 15#include <linux/config.h>
16 16
17#if defined(CONFIG_MIPS32) || defined(WANT_COMPAT_REG_H) 17#if defined(CONFIG_32BIT) || defined(WANT_COMPAT_REG_H)
18 18
19#define EF_R0 6 19#define EF_R0 6
20#define EF_R1 7 20#define EF_R1 7
@@ -70,7 +70,7 @@
70 70
71#endif 71#endif
72 72
73#if CONFIG_MIPS64 73#if CONFIG_64BIT
74 74
75#define EF_R0 0 75#define EF_R0 0
76#define EF_R1 1 76#define EF_R1 1
@@ -124,6 +124,6 @@
124 124
125#define EF_SIZE 304 /* size in bytes */ 125#define EF_SIZE 304 /* size in bytes */
126 126
127#endif /* CONFIG_MIPS64 */ 127#endif /* CONFIG_64BIT */
128 128
129#endif /* __ASM_MIPS_REG_H */ 129#endif /* __ASM_MIPS_REG_H */
diff --git a/include/asm-mips/resource.h b/include/asm-mips/resource.h
index fd3c6d17a5f6..1fba00c22077 100644
--- a/include/asm-mips/resource.h
+++ b/include/asm-mips/resource.h
@@ -27,7 +27,7 @@
27 * but we keep the old value on MIPS32, 27 * but we keep the old value on MIPS32,
28 * for compatibility: 28 * for compatibility:
29 */ 29 */
30#ifdef CONFIG_MIPS32 30#ifdef CONFIG_32BIT
31# define RLIM_INFINITY 0x7fffffffUL 31# define RLIM_INFINITY 0x7fffffffUL
32#endif 32#endif
33 33
diff --git a/include/asm-mips/sgiarcs.h b/include/asm-mips/sgiarcs.h
index 59450335f049..722b77a8c5e5 100644
--- a/include/asm-mips/sgiarcs.h
+++ b/include/asm-mips/sgiarcs.h
@@ -367,7 +367,7 @@ struct linux_smonblock {
367 * Macros for calling a 32-bit ARC implementation from 64-bit code 367 * Macros for calling a 32-bit ARC implementation from 64-bit code
368 */ 368 */
369 369
370#if defined(CONFIG_MIPS64) && defined(CONFIG_ARC32) 370#if defined(CONFIG_64BIT) && defined(CONFIG_ARC32)
371 371
372#define __arc_clobbers \ 372#define __arc_clobbers \
373 "$2","$3" /* ... */, "$8","$9","$10","$11", \ 373 "$2","$3" /* ... */, "$8","$9","$10","$11", \
@@ -476,10 +476,10 @@ struct linux_smonblock {
476 __res; \ 476 __res; \
477}) 477})
478 478
479#endif /* defined(CONFIG_MIPS64) && defined(CONFIG_ARC32) */ 479#endif /* defined(CONFIG_64BIT) && defined(CONFIG_ARC32) */
480 480
481#if (defined(CONFIG_MIPS32) && defined(CONFIG_ARC32)) || \ 481#if (defined(CONFIG_32BIT) && defined(CONFIG_ARC32)) || \
482 (defined(CONFIG_MIPS64) && defined(CONFIG_ARC64)) 482 (defined(CONFIG_64BIT) && defined(CONFIG_ARC64))
483 483
484#define ARC_CALL0(dest) \ 484#define ARC_CALL0(dest) \
485({ long __res; \ 485({ long __res; \
diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h
index a0e26e6c994d..698becab5a9e 100644
--- a/include/asm-mips/siginfo.h
+++ b/include/asm-mips/siginfo.h
@@ -25,10 +25,10 @@ struct siginfo;
25/* 25/*
26 * Careful to keep union _sifields from shifting ... 26 * Careful to keep union _sifields from shifting ...
27 */ 27 */
28#ifdef CONFIG_MIPS32 28#ifdef CONFIG_32BIT
29#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) 29#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
30#endif 30#endif
31#ifdef CONFIG_MIPS64 31#ifdef CONFIG_64BIT
32#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) 32#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
33#endif 33#endif
34 34
diff --git a/include/asm-mips/sim.h b/include/asm-mips/sim.h
index 6333169be329..3ccfe09fa744 100644
--- a/include/asm-mips/sim.h
+++ b/include/asm-mips/sim.h
@@ -16,7 +16,7 @@
16#define __str2(x) #x 16#define __str2(x) #x
17#define __str(x) __str2(x) 17#define __str(x) __str2(x)
18 18
19#ifdef CONFIG_MIPS32 19#ifdef CONFIG_32BIT
20 20
21#define save_static_function(symbol) \ 21#define save_static_function(symbol) \
22__asm__ ( \ 22__asm__ ( \
@@ -42,9 +42,9 @@ __asm__ ( \
42 42
43#define nabi_no_regargs 43#define nabi_no_regargs
44 44
45#endif /* CONFIG_MIPS32 */ 45#endif /* CONFIG_32BIT */
46 46
47#ifdef CONFIG_MIPS64 47#ifdef CONFIG_64BIT
48 48
49#define save_static_function(symbol) \ 49#define save_static_function(symbol) \
50__asm__ ( \ 50__asm__ ( \
@@ -78,6 +78,6 @@ __asm__ ( \
78 unsigned long __dummy6, \ 78 unsigned long __dummy6, \
79 unsigned long __dummy7, 79 unsigned long __dummy7,
80 80
81#endif /* CONFIG_MIPS64 */ 81#endif /* CONFIG_64BIT */
82 82
83#endif /* _ASM_SIM_H */ 83#endif /* _ASM_SIM_H */
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h
index 86283c25fd5b..fb42f99f8527 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -26,7 +26,7 @@
26 26
27 .macro SAVE_TEMP 27 .macro SAVE_TEMP
28 mfhi v1 28 mfhi v1
29#ifdef CONFIG_MIPS32 29#ifdef CONFIG_32BIT
30 LONG_S $8, PT_R8(sp) 30 LONG_S $8, PT_R8(sp)
31 LONG_S $9, PT_R9(sp) 31 LONG_S $9, PT_R9(sp)
32#endif 32#endif
@@ -56,7 +56,7 @@
56 56
57#ifdef CONFIG_SMP 57#ifdef CONFIG_SMP
58 .macro get_saved_sp /* SMP variation */ 58 .macro get_saved_sp /* SMP variation */
59#ifdef CONFIG_MIPS32 59#ifdef CONFIG_32BIT
60 mfc0 k0, CP0_CONTEXT 60 mfc0 k0, CP0_CONTEXT
61 lui k1, %hi(kernelsp) 61 lui k1, %hi(kernelsp)
62 srl k0, k0, 23 62 srl k0, k0, 23
@@ -64,7 +64,7 @@
64 addu k1, k0 64 addu k1, k0
65 LONG_L k1, %lo(kernelsp)(k1) 65 LONG_L k1, %lo(kernelsp)(k1)
66#endif 66#endif
67#if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) 67#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
68 MFC0 k1, CP0_CONTEXT 68 MFC0 k1, CP0_CONTEXT
69 dsra k1, 23 69 dsra k1, 23
70 lui k0, %hi(pgd_current) 70 lui k0, %hi(pgd_current)
@@ -74,7 +74,7 @@
74 daddu k1, k0 74 daddu k1, k0
75 LONG_L k1, %lo(kernelsp)(k1) 75 LONG_L k1, %lo(kernelsp)(k1)
76#endif 76#endif
77#if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) 77#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
78 MFC0 k1, CP0_CONTEXT 78 MFC0 k1, CP0_CONTEXT
79 dsrl k1, 23 79 dsrl k1, 23
80 dsll k1, k1, 3 80 dsll k1, k1, 3
@@ -83,20 +83,20 @@
83 .endm 83 .endm
84 84
85 .macro set_saved_sp stackp temp temp2 85 .macro set_saved_sp stackp temp temp2
86#ifdef CONFIG_MIPS32 86#ifdef CONFIG_32BIT
87 mfc0 \temp, CP0_CONTEXT 87 mfc0 \temp, CP0_CONTEXT
88 srl \temp, 23 88 srl \temp, 23
89 sll \temp, 2 89 sll \temp, 2
90 LONG_S \stackp, kernelsp(\temp) 90 LONG_S \stackp, kernelsp(\temp)
91#endif 91#endif
92#if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) 92#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
93 lw \temp, TI_CPU(gp) 93 lw \temp, TI_CPU(gp)
94 dsll \temp, 3 94 dsll \temp, 3
95 lui \temp2, %hi(kernelsp) 95 lui \temp2, %hi(kernelsp)
96 daddu \temp, \temp2 96 daddu \temp, \temp2
97 LONG_S \stackp, %lo(kernelsp)(\temp) 97 LONG_S \stackp, %lo(kernelsp)(\temp)
98#endif 98#endif
99#if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) 99#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
100 lw \temp, TI_CPU(gp) 100 lw \temp, TI_CPU(gp)
101 dsll \temp, 3 101 dsll \temp, 3
102 LONG_S \stackp, kernelsp(\temp) 102 LONG_S \stackp, kernelsp(\temp)
@@ -140,7 +140,7 @@
140 LONG_S $6, PT_R6(sp) 140 LONG_S $6, PT_R6(sp)
141 MFC0 v1, CP0_EPC 141 MFC0 v1, CP0_EPC
142 LONG_S $7, PT_R7(sp) 142 LONG_S $7, PT_R7(sp)
143#ifdef CONFIG_MIPS64 143#ifdef CONFIG_64BIT
144 LONG_S $8, PT_R8(sp) 144 LONG_S $8, PT_R8(sp)
145 LONG_S $9, PT_R9(sp) 145 LONG_S $9, PT_R9(sp)
146#endif 146#endif
@@ -169,7 +169,7 @@
169 169
170 .macro RESTORE_TEMP 170 .macro RESTORE_TEMP
171 LONG_L $24, PT_LO(sp) 171 LONG_L $24, PT_LO(sp)
172#ifdef CONFIG_MIPS32 172#ifdef CONFIG_32BIT
173 LONG_L $8, PT_R8(sp) 173 LONG_L $8, PT_R8(sp)
174 LONG_L $9, PT_R9(sp) 174 LONG_L $9, PT_R9(sp)
175#endif 175#endif
@@ -217,7 +217,7 @@
217 LONG_L $31, PT_R31(sp) 217 LONG_L $31, PT_R31(sp)
218 LONG_L $28, PT_R28(sp) 218 LONG_L $28, PT_R28(sp)
219 LONG_L $25, PT_R25(sp) 219 LONG_L $25, PT_R25(sp)
220#ifdef CONFIG_MIPS64 220#ifdef CONFIG_64BIT
221 LONG_L $8, PT_R8(sp) 221 LONG_L $8, PT_R8(sp)
222 LONG_L $9, PT_R9(sp) 222 LONG_L $9, PT_R9(sp)
223#endif 223#endif
@@ -262,7 +262,7 @@
262 LONG_L $31, PT_R31(sp) 262 LONG_L $31, PT_R31(sp)
263 LONG_L $28, PT_R28(sp) 263 LONG_L $28, PT_R28(sp)
264 LONG_L $25, PT_R25(sp) 264 LONG_L $25, PT_R25(sp)
265#ifdef CONFIG_MIPS64 265#ifdef CONFIG_64BIT
266 LONG_L $8, PT_R8(sp) 266 LONG_L $8, PT_R8(sp)
267 LONG_L $9, PT_R9(sp) 267 LONG_L $9, PT_R9(sp)
268#endif 268#endif
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h
index b18345504f8a..5a06f6d13899 100644
--- a/include/asm-mips/string.h
+++ b/include/asm-mips/string.h
@@ -16,7 +16,7 @@
16 * Most of the inline functions are rather naive implementations so I just 16 * Most of the inline functions are rather naive implementations so I just
17 * didn't bother updating them for 64-bit ... 17 * didn't bother updating them for 64-bit ...
18 */ 18 */
19#ifdef CONFIG_MIPS32 19#ifdef CONFIG_32BIT
20 20
21#ifndef IN_STRING_C 21#ifndef IN_STRING_C
22 22
@@ -130,7 +130,7 @@ strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count)
130 130
131 return __res; 131 return __res;
132} 132}
133#endif /* CONFIG_MIPS32 */ 133#endif /* CONFIG_32BIT */
134 134
135#define __HAVE_ARCH_MEMSET 135#define __HAVE_ARCH_MEMSET
136extern void *memset(void *__s, int __c, size_t __count); 136extern void *memset(void *__s, int __c, size_t __count);
@@ -141,7 +141,7 @@ extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
141#define __HAVE_ARCH_MEMMOVE 141#define __HAVE_ARCH_MEMMOVE
142extern void *memmove(void *__dest, __const__ void *__src, size_t __n); 142extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
143 143
144#ifdef CONFIG_MIPS32 144#ifdef CONFIG_32BIT
145#define __HAVE_ARCH_MEMSCAN 145#define __HAVE_ARCH_MEMSCAN
146static __inline__ void *memscan(void *__addr, int __c, size_t __size) 146static __inline__ void *memscan(void *__addr, int __c, size_t __size)
147{ 147{
@@ -161,6 +161,6 @@ static __inline__ void *memscan(void *__addr, int __c, size_t __size)
161 161
162 return __addr; 162 return __addr;
163} 163}
164#endif /* CONFIG_MIPS32 */ 164#endif /* CONFIG_32BIT */
165 165
166#endif /* _ASM_STRING_H */ 166#endif /* _ASM_STRING_H */
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index 169f3d4265b1..6663efd49b27 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -208,7 +208,7 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
208 return retval; 208 return retval;
209} 209}
210 210
211#ifdef CONFIG_MIPS64 211#ifdef CONFIG_64BIT
212static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) 212static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val)
213{ 213{
214 __u64 retval; 214 __u64 retval;
@@ -330,7 +330,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
330 return retval; 330 return retval;
331} 331}
332 332
333#ifdef CONFIG_MIPS64 333#ifdef CONFIG_64BIT
334static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, 334static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
335 unsigned long new) 335 unsigned long new)
336{ 336{
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h
index 42fcd6f2c206..a70cb0854c8a 100644
--- a/include/asm-mips/thread_info.h
+++ b/include/asm-mips/thread_info.h
@@ -62,10 +62,10 @@ register struct thread_info *__current_thread_info __asm__("$28");
62#define current_thread_info() __current_thread_info 62#define current_thread_info() __current_thread_info
63 63
64/* thread information allocation */ 64/* thread information allocation */
65#if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_MIPS32) 65#if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_32BIT)
66#define THREAD_SIZE_ORDER (1) 66#define THREAD_SIZE_ORDER (1)
67#endif 67#endif
68#if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_MIPS64) 68#if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_64BIT)
69#define THREAD_SIZE_ORDER (2) 69#define THREAD_SIZE_ORDER (2)
70#endif 70#endif
71#ifdef CONFIG_PAGE_SIZE_8KB 71#ifdef CONFIG_PAGE_SIZE_8KB
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h
index b949ab33e8e2..421b3aea14cc 100644
--- a/include/asm-mips/types.h
+++ b/include/asm-mips/types.h
@@ -78,7 +78,7 @@ typedef unsigned long long u64;
78#endif 78#endif
79 79
80#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ 80#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
81 || defined(CONFIG_MIPS64) 81 || defined(CONFIG_64BIT)
82typedef u64 dma_addr_t; 82typedef u64 dma_addr_t;
83#else 83#else
84typedef u32 dma_addr_t; 84typedef u32 dma_addr_t;
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h
index 07114898e065..a543ead72ecf 100644
--- a/include/asm-mips/uaccess.h
+++ b/include/asm-mips/uaccess.h
@@ -22,7 +22,7 @@
22 * 22 *
23 * For historical reasons, these macros are grossly misnamed. 23 * For historical reasons, these macros are grossly misnamed.
24 */ 24 */
25#ifdef CONFIG_MIPS32 25#ifdef CONFIG_32BIT
26 26
27#define __UA_LIMIT 0x80000000UL 27#define __UA_LIMIT 0x80000000UL
28 28
@@ -32,9 +32,9 @@
32#define __UA_t0 "$8" 32#define __UA_t0 "$8"
33#define __UA_t1 "$9" 33#define __UA_t1 "$9"
34 34
35#endif /* CONFIG_MIPS32 */ 35#endif /* CONFIG_32BIT */
36 36
37#ifdef CONFIG_MIPS64 37#ifdef CONFIG_64BIT
38 38
39#define __UA_LIMIT (- TASK_SIZE) 39#define __UA_LIMIT (- TASK_SIZE)
40 40
@@ -44,7 +44,7 @@
44#define __UA_t0 "$12" 44#define __UA_t0 "$12"
45#define __UA_t1 "$13" 45#define __UA_t1 "$13"
46 46
47#endif /* CONFIG_MIPS64 */ 47#endif /* CONFIG_64BIT */
48 48
49/* 49/*
50 * USER_DS is a bitmask that has the bits set that may not be set in a valid 50 * USER_DS is a bitmask that has the bits set that may not be set in a valid
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 6d21cc964f76..ad4d48056307 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -1124,7 +1124,7 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \
1124# ifndef __mips64 1124# ifndef __mips64
1125# define __ARCH_WANT_STAT64 1125# define __ARCH_WANT_STAT64
1126# endif 1126# endif
1127# ifdef CONFIG_MIPS32 1127# ifdef CONFIG_32BIT
1128# define __ARCH_WANT_SYS_TIME 1128# define __ARCH_WANT_SYS_TIME
1129# endif 1129# endif
1130# ifdef CONFIG_MIPS32_O32 1130# ifdef CONFIG_MIPS32_O32