projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0548eb0
)
x86/percpu: Define PER_CPU_VAR macro also for !__ASSEMBLY__
author
Uros Bizjak
<ubizjak@gmail.com>
Sun, 5 Nov 2023 21:34:35 +0000
(22:34 +0100)
committer
Ingo Molnar
<mingo@kernel.org>
Thu, 30 Nov 2023 19:06:16 +0000
(20:06 +0100)
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
arch/x86/include/asm/percpu.h
patch
|
blob
|
history
diff --git
a/arch/x86/include/asm/percpu.h
b/arch/x86/include/asm/percpu.h
index b86b27d15e528703a469dbd4898143d26daf7f5a..0f12b2004b9420d8d140a76d9829d0c0e24fc41a 100644
(file)
--- 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