diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2023-11-06 00:34:35 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-11-30 22:06:16 +0300 |
commit | 43bda69ed9e3b86d0ba5ff9256e437d50074d7d5 (patch) | |
tree | ffca0e834d4ce04cb7ea3ee08ee2af7ab00e294d | |
parent | 0548eb067ed664b93043e033295ca71e3e706245 (diff) | |
download | linux-43bda69ed9e3b86d0ba5ff9256e437d50074d7d5.tar.xz |
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
-rw-r--r-- | arch/x86/include/asm/percpu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index b86b27d15e52..0f12b2004b94 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -84,10 +84,15 @@ }) #endif /* CONFIG_USE_X86_SEG_SUPPORT */ +#define PER_CPU_VAR(var) %__percpu_seg:(var)__percpu_rel + #else /* CONFIG_SMP */ #define __percpu_seg_override #define __percpu_prefix "" #define __force_percpu_prefix "" + +#define PER_CPU_VAR(var) (var)__percpu_rel + #endif /* CONFIG_SMP */ #define __my_cpu_type(var) typeof(var) __percpu_seg_override |