Skip to contentSkip to conversation

MIPS: Loongson: Adjust cpu features for Loongson-3

PATCH In review Huacai Chen 2 participants 2 messages Apr 20, 2016 – May 13, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Loongson: Adjust cpu features for Loongson-3

Some Loongson-3 features (i.e., cpu_has_wsbh, cpu_has_ic_fills_f_dc and cpu_hwrena_impl_bits) are different from Loongson-2, so we define them in a single group. This also fixes 04a35922c1dac ("MIPS: Loongson: Add Loongson-3A R2 basic support") which breaks Loongson-2E/2F's booting.

---
 arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h +4 -2
index c3406db..89328a3d 100644
@@ -27,7 +27,6 @@
 #define cpu_has_dc_aliases	(PAGE_SIZE < 0x4000)
 #define cpu_has_divec		0
 #define cpu_has_ejtag		0
-#define cpu_has_ic_fills_f_dc	0
 #define cpu_has_inclusive_pcaches	1
 #define cpu_has_llsc		1
 #define cpu_has_mcheck		0
@@ -45,7 +44,10 @@
 #define cpu_has_watch		1
 #define cpu_has_local_ebase	0
 
-#define cpu_has_wsbh		IS_ENABLED(CONFIG_CPU_LOONGSON3)
+#ifdef CONFIG_CPU_LOONGSON3
+#define cpu_has_wsbh		1
+#define cpu_has_ic_fills_f_dc	1
 #define cpu_hwrena_impl_bits	0xc0000000
+#endif
 
 #endif /* __ASM_MACH_LOONGSON64_CPU_FEATURE_OVERRIDES_H */
Signature · 1 line
2.7.0
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Huacai Chen

Some Loongson-3 features (i.e., cpu_has_wsbh, cpu_has_ic_fills_f_dc and cpu_hwrena_impl_bits) are different from Loongson-2, so we define them in a single group. This also fixes 04a35922c1dac ("MIPS: Loongson: Add Loongson-3A R2 basic support") which breaks Loongson-2E/2F's booting.

Quoted 28 lines
---
 arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h +4 -2
index c3406db..89328a3d 100644
@@ -27,7 +27,6 @@
 #define cpu_has_dc_aliases	(PAGE_SIZE < 0x4000)
 #define cpu_has_divec		0
 #define cpu_has_ejtag		0
-#define cpu_has_ic_fills_f_dc	0
 #define cpu_has_inclusive_pcaches	1
 #define cpu_has_llsc		1
 #define cpu_has_mcheck		0
@@ -45,7 +44,10 @@
 #define cpu_has_watch		1
 #define cpu_has_local_ebase	0
 
-#define cpu_has_wsbh		IS_ENABLED(CONFIG_CPU_LOONGSON3)
+#ifdef CONFIG_CPU_LOONGSON3
+#define cpu_has_wsbh		1
+#define cpu_has_ic_fills_f_dc	1
 #define cpu_hwrena_impl_bits	0xc0000000
+#endif
 
 #endif /* __ASM_MACH_LOONGSON64_CPU_FEATURE_OVERRIDES_H */