summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2023-06-07 13:51:22 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-30 16:31:52 +0200
commitd043d0373fa9195125876cd8cb9c0079d6cf3697 (patch)
tree3fd895f035bc7e9955eb708778f9280561e8c5f2 /arch/mips
parentcee476bfadcf70e685cc26e0a188c0e22732a54b (diff)
downloadlinux-stable-d043d0373fa9195125876cd8cb9c0079d6cf3697.tar.gz
linux-stable-d043d0373fa9195125876cd8cb9c0079d6cf3697.tar.bz2
linux-stable-d043d0373fa9195125876cd8cb9c0079d6cf3697.zip
MIPS: cpu-features: Use boot_cpu_type for CPU type based features
[ Upstream commit 5487a7b60695a92cf998350e4beac17144c91fcd ] 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: stable@vger.kernel.org Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/cpu-features.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 73fa4c3337f8..51faee420745 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -115,7 +115,7 @@
({ \
int __res; \
\
- switch (current_cpu_type()) { \
+ switch (boot_cpu_type()) { \
case CPU_CAVIUM_OCTEON: \
case CPU_CAVIUM_OCTEON_PLUS: \
case CPU_CAVIUM_OCTEON2: \
@@ -349,7 +349,7 @@
({ \
int __res; \
\
- switch (current_cpu_type()) { \
+ switch (boot_cpu_type()) { \
case CPU_M14KC: \
case CPU_74K: \
case CPU_1074K: \