diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-10-01 08:06:32 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:32:32 -0400 |
commit | 02cf2119684e52e97a8a90bd7630386e0f1a250a (patch) | |
tree | fbe051feacc403d7703bf27043ac048b5d2f2369 /include/asm-mips | |
parent | 942d042d17c77febab9af6815b2e77f665d0f9c1 (diff) |
Cleanup the mess in cpu_cache_init.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/cpu-features.h | 15 | ||||
-rw-r--r-- | include/asm-mips/cpu.h | 40 | ||||
-rw-r--r-- | include/asm-mips/mach-ip22/cpu-feature-overrides.h | 2 | ||||
-rw-r--r-- | include/asm-mips/mach-mips/cpu-feature-overrides.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mach-rm200/cpu-feature-overrides.h | 2 | ||||
-rw-r--r-- | include/asm-mips/mach-sim/cpu-feature-overrides.h | 4 |
6 files changed, 40 insertions, 27 deletions
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index 698c21125a5c..03627cfb3e45 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h | |||
@@ -25,8 +25,19 @@ | |||
25 | #ifndef cpu_has_4kex | 25 | #ifndef cpu_has_4kex |
26 | #define cpu_has_4kex (cpu_data[0].options & MIPS_CPU_4KEX) | 26 | #define cpu_has_4kex (cpu_data[0].options & MIPS_CPU_4KEX) |
27 | #endif | 27 | #endif |
28 | #ifndef cpu_has_4ktlb | 28 | #ifndef cpu_has_3k_cache |
29 | #define cpu_has_4ktlb (cpu_data[0].options & MIPS_CPU_4KTLB) | 29 | #define cpu_has_3k_cache (cpu_data[0].options & MIPS_CPU_3K_CACHE) |
30 | #endif | ||
31 | #define cpu_has_6k_cache 0 | ||
32 | #define cpu_has_8k_cache 0 | ||
33 | #ifndef cpu_has_4k_cache | ||
34 | #define cpu_has_4k_cache (cpu_data[0].options & MIPS_CPU_4K_CACHE) | ||
35 | #endif | ||
36 | #ifndef cpu_has_tx39_cache | ||
37 | #define cpu_has_tx39_cache (cpu_data[0].options & MIPS_CPU_TX39_CACHE) | ||
38 | #endif | ||
39 | #ifndef cpu_has_sb1_cache | ||
40 | #define cpu_has_sb1_cache (cpu_data[0].options & MIPS_CPU_SB1_CACHE) | ||
30 | #endif | 41 | #endif |
31 | #ifndef cpu_has_fpu | 42 | #ifndef cpu_has_fpu |
32 | #define cpu_has_fpu (cpu_data[0].options & MIPS_CPU_FPU) | 43 | #define cpu_has_fpu (cpu_data[0].options & MIPS_CPU_FPU) |
diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h index 2e8b5a48b99f..46b2a8dc2ee0 100644 --- a/include/asm-mips/cpu.h +++ b/include/asm-mips/cpu.h | |||
@@ -217,25 +217,27 @@ | |||
217 | * CPU Option encodings | 217 | * CPU Option encodings |
218 | */ | 218 | */ |
219 | #define MIPS_CPU_TLB 0x00000001 /* CPU has TLB */ | 219 | #define MIPS_CPU_TLB 0x00000001 /* CPU has TLB */ |
220 | /* Leave a spare bit for variant MMU types... */ | 220 | #define MIPS_CPU_4KEX 0x00000002 /* "R4K" exception model */ |
221 | #define MIPS_CPU_4KEX 0x00000004 /* "R4K" exception model */ | 221 | #define MIPS_CPU_3K_CACHE 0x00000004 /* R3000-style caches */ |
222 | #define MIPS_CPU_4KTLB 0x00000008 /* "R4K" TLB handler */ | 222 | #define MIPS_CPU_4K_CACHE 0x00000008 /* R4000-style caches */ |
223 | #define MIPS_CPU_FPU 0x00000010 /* CPU has FPU */ | 223 | #define MIPS_CPU_TX39_CACHE 0x00000010 /* TX3900-style caches */ |
224 | #define MIPS_CPU_32FPR 0x00000020 /* 32 dbl. prec. FP registers */ | 224 | #define MIPS_CPU_SB1_CACHE 0x00000020 /* SB1-style caches */ |
225 | #define MIPS_CPU_COUNTER 0x00000040 /* Cycle count/compare */ | 225 | #define MIPS_CPU_FPU 0x00000040 /* CPU has FPU */ |
226 | #define MIPS_CPU_WATCH 0x00000080 /* watchpoint registers */ | 226 | #define MIPS_CPU_32FPR 0x00000080 /* 32 dbl. prec. FP registers */ |
227 | #define MIPS_CPU_DIVEC 0x00000200 /* dedicated interrupt vector */ | 227 | #define MIPS_CPU_COUNTER 0x00000100 /* Cycle count/compare */ |
228 | #define MIPS_CPU_VCE 0x00000400 /* virt. coherence conflict possible */ | 228 | #define MIPS_CPU_WATCH 0x00000200 /* watchpoint registers */ |
229 | #define MIPS_CPU_CACHE_CDEX_P 0x00000800 /* Create_Dirty_Exclusive CACHE op */ | 229 | #define MIPS_CPU_DIVEC 0x00000400 /* dedicated interrupt vector */ |
230 | #define MIPS_CPU_CACHE_CDEX_S 0x00001000 /* ... same for seconary cache ... */ | 230 | #define MIPS_CPU_VCE 0x00000800 /* virt. coherence conflict possible */ |
231 | #define MIPS_CPU_MCHECK 0x00002000 /* Machine check exception */ | 231 | #define MIPS_CPU_CACHE_CDEX_P 0x00001000 /* Create_Dirty_Exclusive CACHE op */ |
232 | #define MIPS_CPU_EJTAG 0x00004000 /* EJTAG exception */ | 232 | #define MIPS_CPU_CACHE_CDEX_S 0x00002000 /* ... same for seconary cache ... */ |
233 | #define MIPS_CPU_NOFPUEX 0x00008000 /* no FPU exception */ | 233 | #define MIPS_CPU_MCHECK 0x00004000 /* Machine check exception */ |
234 | #define MIPS_CPU_LLSC 0x00010000 /* CPU has ll/sc instructions */ | 234 | #define MIPS_CPU_EJTAG 0x00008000 /* EJTAG exception */ |
235 | #define MIPS_CPU_SUBSET_CACHES 0x00020000 /* P-cache subset enforced */ | 235 | #define MIPS_CPU_NOFPUEX 0x00010000 /* no FPU exception */ |
236 | #define MIPS_CPU_PREFETCH 0x00040000 /* CPU has usable prefetch */ | 236 | #define MIPS_CPU_LLSC 0x00020000 /* CPU has ll/sc instructions */ |
237 | #define MIPS_CPU_VINT 0x00080000 /* CPU supports MIPSR2 vectored interrupts */ | 237 | #define MIPS_CPU_SUBSET_CACHES 0x00040000 /* P-cache subset enforced */ |
238 | #define MIPS_CPU_VEIC 0x00100000 /* CPU supports MIPSR2 external interrupt controller mode */ | 238 | #define MIPS_CPU_PREFETCH 0x00080000 /* CPU has usable prefetch */ |
239 | #define MIPS_CPU_VINT 0x00100000 /* CPU supports MIPSR2 vectored interrupts */ | ||
240 | #define MIPS_CPU_VEIC 0x00200000 /* CPU supports MIPSR2 external interrupt controller mode */ | ||
239 | 241 | ||
240 | /* | 242 | /* |
241 | * CPU ASE encodings | 243 | * CPU ASE encodings |
diff --git a/include/asm-mips/mach-ip22/cpu-feature-overrides.h b/include/asm-mips/mach-ip22/cpu-feature-overrides.h index ac71b4d6510a..ab9714668177 100644 --- a/include/asm-mips/mach-ip22/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip22/cpu-feature-overrides.h | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #define cpu_has_tlb 1 | 14 | #define cpu_has_tlb 1 |
15 | #define cpu_has_4kex 1 | 15 | #define cpu_has_4kex 1 |
16 | #define cpu_has_4ktlb 1 | 16 | #define cpu_has_4kcache 1 |
17 | #define cpu_has_fpu 1 | 17 | #define cpu_has_fpu 1 |
18 | #define cpu_has_32fpr 1 | 18 | #define cpu_has_32fpr 1 |
19 | #define cpu_has_counter 1 | 19 | #define cpu_has_counter 1 |
diff --git a/include/asm-mips/mach-mips/cpu-feature-overrides.h b/include/asm-mips/mach-mips/cpu-feature-overrides.h index 98927f8b5f6d..5c5edbf93707 100644 --- a/include/asm-mips/mach-mips/cpu-feature-overrides.h +++ b/include/asm-mips/mach-mips/cpu-feature-overrides.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #ifdef CONFIG_CPU_MIPS32_R1 | 17 | #ifdef CONFIG_CPU_MIPS32_R1 |
18 | #define cpu_has_tlb 1 | 18 | #define cpu_has_tlb 1 |
19 | #define cpu_has_4kex 1 | 19 | #define cpu_has_4kex 1 |
20 | #define cpu_has_4ktlb 1 | 20 | #define cpu_has_4kcache 1 |
21 | /* #define cpu_has_fpu ? */ | 21 | /* #define cpu_has_fpu ? */ |
22 | /* #define cpu_has_32fpr ? */ | 22 | /* #define cpu_has_32fpr ? */ |
23 | #define cpu_has_counter 1 | 23 | #define cpu_has_counter 1 |
@@ -43,7 +43,7 @@ | |||
43 | #ifdef CONFIG_CPU_MIPS64_R1 | 43 | #ifdef CONFIG_CPU_MIPS64_R1 |
44 | #define cpu_has_tlb 1 | 44 | #define cpu_has_tlb 1 |
45 | #define cpu_has_4kex 1 | 45 | #define cpu_has_4kex 1 |
46 | #define cpu_has_4ktlb 1 | 46 | #define cpu_has_4kcache 1 |
47 | /* #define cpu_has_fpu ? */ | 47 | /* #define cpu_has_fpu ? */ |
48 | /* #define cpu_has_32fpr ? */ | 48 | /* #define cpu_has_32fpr ? */ |
49 | #define cpu_has_counter 1 | 49 | #define cpu_has_counter 1 |
diff --git a/include/asm-mips/mach-rm200/cpu-feature-overrides.h b/include/asm-mips/mach-rm200/cpu-feature-overrides.h index 9b2a40524679..79f9b064c864 100644 --- a/include/asm-mips/mach-rm200/cpu-feature-overrides.h +++ b/include/asm-mips/mach-rm200/cpu-feature-overrides.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #define cpu_has_tlb 1 | 15 | #define cpu_has_tlb 1 |
16 | #define cpu_has_4kex 1 | 16 | #define cpu_has_4kex 1 |
17 | #define cpu_has_4ktlb 1 | 17 | #define cpu_has_4kcache 1 |
18 | #define cpu_has_fpu 1 | 18 | #define cpu_has_fpu 1 |
19 | #define cpu_has_32fpr 1 | 19 | #define cpu_has_32fpr 1 |
20 | #define cpu_has_counter 1 | 20 | #define cpu_has_counter 1 |
diff --git a/include/asm-mips/mach-sim/cpu-feature-overrides.h b/include/asm-mips/mach-sim/cpu-feature-overrides.h index 09457217a57d..cadbe8eda79c 100644 --- a/include/asm-mips/mach-sim/cpu-feature-overrides.h +++ b/include/asm-mips/mach-sim/cpu-feature-overrides.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifdef CONFIG_CPU_MIPS32 | 16 | #ifdef CONFIG_CPU_MIPS32 |
17 | #define cpu_has_tlb 1 | 17 | #define cpu_has_tlb 1 |
18 | #define cpu_has_4kex 1 | 18 | #define cpu_has_4kex 1 |
19 | #define cpu_has_4ktlb 1 | 19 | #define cpu_has_4kcache 1 |
20 | #define cpu_has_fpu 0 | 20 | #define cpu_has_fpu 0 |
21 | /* #define cpu_has_32fpr ? */ | 21 | /* #define cpu_has_32fpr ? */ |
22 | #define cpu_has_counter 1 | 22 | #define cpu_has_counter 1 |
@@ -41,7 +41,7 @@ | |||
41 | #ifdef CONFIG_CPU_MIPS64 | 41 | #ifdef CONFIG_CPU_MIPS64 |
42 | #define cpu_has_tlb 1 | 42 | #define cpu_has_tlb 1 |
43 | #define cpu_has_4kex 1 | 43 | #define cpu_has_4kex 1 |
44 | #define cpu_has_4ktlb 1 | 44 | #define cpu_has_4kcache 1 |
45 | /* #define cpu_has_fpu ? */ | 45 | /* #define cpu_has_fpu ? */ |
46 | /* #define cpu_has_32fpr ? */ | 46 | /* #define cpu_has_32fpr ? */ |
47 | #define cpu_has_counter 1 | 47 | #define cpu_has_counter 1 |