x86/percpu: Rewrite x86_this_cpu_test_bit() and friends as macros
authorUros Bizjak <ubizjak@gmail.com>
Thu, 4 Apr 2024 09:42:02 +0000 (11:42 +0200)
committerIngo Molnar <mingo@kernel.org>
Sat, 6 Apr 2024 10:42:17 +0000 (12:42 +0200)
commita3f8a3a2cf0b7b3ccb51ee60d51c0b5435c7135a
tree98565221015674dbc31a34ff4b782bdd9982c168
parent4c3677c077582f8665806def3f6dd35587793c69
x86/percpu: Rewrite x86_this_cpu_test_bit() and friends as macros

Rewrite the whole family of x86_this_cpu_test_bit() functions
as macros, so standard __my_cpu_var() and raw_cpu_read() macros
can be used on percpu variables. This approach considerably
simplifies implementation of functions and also introduces
standard checks on accessed percpu variables.

No functional changes intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240404094218.448963-2-ubizjak@gmail.com
arch/um/include/asm/cpufeature.h
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/percpu.h