Skip to content

Commit 43bda69

Browse files
ubizjakingomolnar
authored andcommitted
x86/percpu: Define PER_CPU_VAR macro also for !__ASSEMBLY__
Some C source files define 'asm' statements that use PER_CPU_VAR, so make PER_CPU_VAR macro available also without __ASSEMBLY__. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20231105213731.1878100-2-ubizjak@gmail.com
1 parent 0548eb0 commit 43bda69

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

arch/x86/include/asm/percpu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,15 @@
8484
})
8585
#endif /* CONFIG_USE_X86_SEG_SUPPORT */
8686

87+
#define PER_CPU_VAR(var) %__percpu_seg:(var)__percpu_rel
88+
8789
#else /* CONFIG_SMP */
8890
#define __percpu_seg_override
8991
#define __percpu_prefix ""
9092
#define __force_percpu_prefix ""
93+
94+
#define PER_CPU_VAR(var) (var)__percpu_rel
95+
9196
#endif /* CONFIG_SMP */
9297

9398
#define __my_cpu_type(var) typeof(var) __percpu_seg_override

0 commit comments

Comments
 (0)