diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2024-04-04 11:42:02 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-04-06 12:42:17 +0200 |
commit | a3f8a3a2cf0b7b3ccb51ee60d51c0b5435c7135a (patch) | |
tree | 98565221015674dbc31a34ff4b782bdd9982c168 /arch/um/include/asm | |
parent | 4c3677c077582f8665806def3f6dd35587793c69 (diff) | |
download | linux-stable-a3f8a3a2cf0b7b3ccb51ee60d51c0b5435c7135a.tar.gz linux-stable-a3f8a3a2cf0b7b3ccb51ee60d51c0b5435c7135a.tar.bz2 linux-stable-a3f8a3a2cf0b7b3ccb51ee60d51c0b5435c7135a.zip |
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
Diffstat (limited to 'arch/um/include/asm')
-rw-r--r-- | arch/um/include/asm/cpufeature.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/include/asm/cpufeature.h b/arch/um/include/asm/cpufeature.h index 66fe06db872f..1eb8b834fbec 100644 --- a/arch/um/include/asm/cpufeature.h +++ b/arch/um/include/asm/cpufeature.h @@ -38,8 +38,7 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; #define this_cpu_has(bit) \ (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \ - x86_this_cpu_test_bit(bit, \ - (unsigned long __percpu *)&cpu_info.x86_capability)) + x86_this_cpu_test_bit(bit, cpu_info.x86_capability)) /* * This macro is for detection of features which need kernel |