hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/mips/include/asm/cpu-features.h
....@@ -126,7 +126,24 @@
126126 #define cpu_has_tx39_cache __opt(MIPS_CPU_TX39_CACHE)
127127 #endif
128128 #ifndef cpu_has_octeon_cache
129
-#define cpu_has_octeon_cache 0
129
+#define cpu_has_octeon_cache \
130
+({ \
131
+ int __res; \
132
+ \
133
+ switch (boot_cpu_type()) { \
134
+ case CPU_CAVIUM_OCTEON: \
135
+ case CPU_CAVIUM_OCTEON_PLUS: \
136
+ case CPU_CAVIUM_OCTEON2: \
137
+ case CPU_CAVIUM_OCTEON3: \
138
+ __res = 1; \
139
+ break; \
140
+ \
141
+ default: \
142
+ __res = 0; \
143
+ } \
144
+ \
145
+ __res; \
146
+})
130147 #endif
131148 /* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */
132149 #ifndef cpu_has_fpu
....@@ -353,7 +370,7 @@
353370 ({ \
354371 int __res; \
355372 \
356
- switch (current_cpu_type()) { \
373
+ switch (boot_cpu_type()) { \
357374 case CPU_M14KC: \
358375 case CPU_74K: \
359376 case CPU_1074K: \