]> 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:23:10 +0000 (16:23 +0200)
commit188edaaaad21fbcf3e96f73fceb1d4acf863cc7c
tree7a5f1ff412fa8341223cd950186134adffad21b8
parent61913b303b317a6d1e78cf7f093b87a87ae115f5
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