Skip to content

Commit 5487a7b

Browse files
FlyGoattsbogend
authored andcommitted
MIPS: cpu-features: Use boot_cpu_type for CPU type based features
Some CPU feature macros were using current_cpu_type to mark feature availability. However current_cpu_type will use smp_processor_id, which is prohibited under preemptable context. Since those features are all uniform on all CPUs in a SMP system, use boot_cpu_type instead of current_cpu_type to fix preemptable kernel. Cc: [email protected] Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent ece6874 commit 5487a7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/include/asm/cpu-features.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
({ \
126126
int __res; \
127127
\
128-
switch (current_cpu_type()) { \
128+
switch (boot_cpu_type()) { \
129129
case CPU_CAVIUM_OCTEON: \
130130
case CPU_CAVIUM_OCTEON_PLUS: \
131131
case CPU_CAVIUM_OCTEON2: \
@@ -368,7 +368,7 @@
368368
({ \
369369
int __res; \
370370
\
371-
switch (current_cpu_type()) { \
371+
switch (boot_cpu_type()) { \
372372
case CPU_M14KC: \
373373
case CPU_74K: \
374374
case CPU_1074K: \

0 commit comments

Comments
 (0)