diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2015-04-03 18:26:04 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-07 19:09:49 -0400 |
commit | 18a2c2c6b9319503eeac8a38b62fc82c9ff81b0d (patch) | |
tree | 42c8af04bc532a7b77b07fea94a3ce647346a067 /arch/mips/include/asm | |
parent | e06b530b92364b2d6ce2981f2c775d2e79dc8f21 (diff) |
MIPS: Correct `nofpu' non-functionality
The `cpu_has_fpu' feature flag must not be hardcoded to 1 or the `nofpu'
kernel option will be ignored. Remove any such overrides and add a
cautionary note. Hardcoding to 0 is fine for FPU-less platforms.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9694/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm')
7 files changed, 1 insertions, 6 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index ea68a38bb61d..62a4730de86a 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -68,6 +68,7 @@ | |||
68 | #ifndef cpu_has_octeon_cache | 68 | #ifndef cpu_has_octeon_cache |
69 | #define cpu_has_octeon_cache 0 | 69 | #define cpu_has_octeon_cache 0 |
70 | #endif | 70 | #endif |
71 | /* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */ | ||
71 | #ifndef cpu_has_fpu | 72 | #ifndef cpu_has_fpu |
72 | #define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU) | 73 | #define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU) |
73 | #define raw_cpu_has_fpu (raw_current_cpu_data.options & MIPS_CPU_FPU) | 74 | #define raw_cpu_has_fpu (raw_current_cpu_data.options & MIPS_CPU_FPU) |
diff --git a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h index 71d4bface1dc..30c5cd9fd973 100644 --- a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #define cpu_has_3k_cache 0 | 14 | #define cpu_has_3k_cache 0 |
15 | #define cpu_has_4k_cache 1 | 15 | #define cpu_has_4k_cache 1 |
16 | #define cpu_has_tx39_cache 0 | 16 | #define cpu_has_tx39_cache 0 |
17 | #define cpu_has_fpu 1 | ||
18 | #define cpu_has_32fpr 1 | 17 | #define cpu_has_32fpr 1 |
19 | #define cpu_has_counter 1 | 18 | #define cpu_has_counter 1 |
20 | #define cpu_has_watch 0 | 19 | #define cpu_has_watch 0 |
diff --git a/arch/mips/include/asm/mach-dec/cpu-feature-overrides.h b/arch/mips/include/asm/mach-dec/cpu-feature-overrides.h index acce27fd2bb8..bdf045fb00c8 100644 --- a/arch/mips/include/asm/mach-dec/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-dec/cpu-feature-overrides.h | |||
@@ -15,7 +15,6 @@ | |||
15 | /* Generic ones first. */ | 15 | /* Generic ones first. */ |
16 | #define cpu_has_tlb 1 | 16 | #define cpu_has_tlb 1 |
17 | #define cpu_has_tx39_cache 0 | 17 | #define cpu_has_tx39_cache 0 |
18 | #define cpu_has_fpu 1 | ||
19 | #define cpu_has_divec 0 | 18 | #define cpu_has_divec 0 |
20 | #define cpu_has_prefetch 0 | 19 | #define cpu_has_prefetch 0 |
21 | #define cpu_has_mcheck 0 | 20 | #define cpu_has_mcheck 0 |
diff --git a/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h index 1dfe47453ea4..9b19b72dba56 100644 --- a/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #define cpu_has_tlb 1 | 16 | #define cpu_has_tlb 1 |
17 | #define cpu_has_4kex 1 | 17 | #define cpu_has_4kex 1 |
18 | #define cpu_has_4k_cache 1 | 18 | #define cpu_has_4k_cache 1 |
19 | #define cpu_has_fpu 1 | ||
20 | #define cpu_has_32fpr 1 | 19 | #define cpu_has_32fpr 1 |
21 | #define cpu_has_counter 1 | 20 | #define cpu_has_counter 1 |
22 | #define cpu_has_mips16 0 | 21 | #define cpu_has_mips16 0 |
diff --git a/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h index 2e1ec6cfedd5..241409b78ff1 100644 --- a/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip32/cpu-feature-overrides.h | |||
@@ -26,7 +26,6 @@ | |||
26 | /* Settings which are common for all ip32 CPUs */ | 26 | /* Settings which are common for all ip32 CPUs */ |
27 | #define cpu_has_tlb 1 | 27 | #define cpu_has_tlb 1 |
28 | #define cpu_has_4kex 1 | 28 | #define cpu_has_4kex 1 |
29 | #define cpu_has_fpu 1 | ||
30 | #define cpu_has_32fpr 1 | 29 | #define cpu_has_32fpr 1 |
31 | #define cpu_has_counter 1 | 30 | #define cpu_has_counter 1 |
32 | #define cpu_has_mips16 0 | 31 | #define cpu_has_mips16 0 |
diff --git a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h index 6d69332f21ec..acc376897e46 100644 --- a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h | |||
@@ -34,7 +34,6 @@ | |||
34 | #define cpu_has_dsp 0 | 34 | #define cpu_has_dsp 0 |
35 | #define cpu_has_dsp2 0 | 35 | #define cpu_has_dsp2 0 |
36 | #define cpu_has_ejtag 0 | 36 | #define cpu_has_ejtag 0 |
37 | #define cpu_has_fpu 1 | ||
38 | #define cpu_has_ic_fills_f_dc 0 | 37 | #define cpu_has_ic_fills_f_dc 0 |
39 | #define cpu_has_inclusive_pcaches 1 | 38 | #define cpu_has_inclusive_pcaches 1 |
40 | #define cpu_has_llsc 1 | 39 | #define cpu_has_llsc 1 |
diff --git a/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h b/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h index f095c529c48c..98cf40417c5d 100644 --- a/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-rm/cpu-feature-overrides.h | |||
@@ -15,7 +15,6 @@ | |||
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_4k_cache 1 | 17 | #define cpu_has_4k_cache 1 |
18 | #define cpu_has_fpu 1 | ||
19 | #define cpu_has_32fpr 1 | 18 | #define cpu_has_32fpr 1 |
20 | #define cpu_has_counter 1 | 19 | #define cpu_has_counter 1 |
21 | #define cpu_has_watch 0 | 20 | #define cpu_has_watch 0 |