]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
MIPS: cpu-features: Use boot_cpu_type for CPU type based features
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Wed, 7 Jun 2023 05:51:22 +0000 (13:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:18:11 +0000 (16:18 +0200)
commit166f0bf4560bd31108cffc0a7a7bc5ea4666be0c
treeffbd87db5a90024a651a9d1e2c430bc10888e231
parent8f106e97409d40384f26199b22cafae3ef7034d0
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>
arch/mips/include/asm/cpu-features.h