Commit 01ab3d26 authored by Jiaxun Yang's avatar Jiaxun Yang Committed by sanglipeng
Browse files

MIPS: cpu-features: Use boot_cpu_type for CPU type based features

stable inclusion
from stable-v5.10.193
commit 188edaaaad21fbcf3e96f73fceb1d4acf863cc7c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9399M

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=188edaaaad21fbcf3e96f73fceb1d4acf863cc7c



--------------------------------

[ Upstream commit 5487a7b6 ]

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: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 30f6a406
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment