mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
x86/percpu: Use BIT_WORD() and BIT_MASK() macros
Use BIT_WORD() and BIT_MASK() macros from <linux/bits.h> in <arch/x86/include/asm/percpu.h> instead of open-coding them. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20250907184915.78041-1-ubizjak@gmail.com
This commit is contained in:
parent
47955b58cf
commit
fd4e025526
|
|
@ -23,6 +23,7 @@
|
|||
#else /* !__ASSEMBLY__: */
|
||||
|
||||
#include <linux/args.h>
|
||||
#include <linux/bits.h>
|
||||
#include <linux/build_bug.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <asm/asm.h>
|
||||
|
|
@ -572,9 +573,9 @@ do { \
|
|||
#define x86_this_cpu_constant_test_bit(_nr, _var) \
|
||||
({ \
|
||||
unsigned long __percpu *addr__ = \
|
||||
(unsigned long __percpu *)&(_var) + ((_nr) / BITS_PER_LONG); \
|
||||
(unsigned long __percpu *)&(_var) + BIT_WORD(_nr); \
|
||||
\
|
||||
!!((1UL << ((_nr) % BITS_PER_LONG)) & raw_cpu_read(*addr__)); \
|
||||
!!(BIT_MASK(_nr) & raw_cpu_read(*addr__)); \
|
||||
})
|
||||
|
||||
#define x86_this_cpu_variable_test_bit(_nr, _var) \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user