Skip to content

Commit ca3ec9e

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
x86/cpu: Use EXPORT_PER_CPU_SYMBOL_GPL() for x86_spec_ctrl_current
Sparse rightfully complains: bugs.c:71:9: sparse: warning: incorrect type in initializer (different address spaces) bugs.c:71:9: sparse: expected void const [noderef] __percpu *__vpp_verify bugs.c:71:9: sparse: got unsigned long long * The reason is that x86_spec_ctrl_current which is a per CPU variable is exported with EXPORT_SYMBOL_GPL(). Use EXPORT_PER_CPU_SYMBOL_GPL() instead. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20240304005104.732288812@linutronix.de
1 parent ae6b019 commit ca3ec9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ EXPORT_SYMBOL_GPL(x86_spec_ctrl_base);
5656

5757
/* The current value of the SPEC_CTRL MSR with task-specific bits set */
5858
DEFINE_PER_CPU(u64, x86_spec_ctrl_current);
59-
EXPORT_SYMBOL_GPL(x86_spec_ctrl_current);
59+
EXPORT_PER_CPU_SYMBOL_GPL(x86_spec_ctrl_current);
6060

6161
u64 x86_pred_cmd __ro_after_init = PRED_CMD_IBPB;
6262
EXPORT_SYMBOL_GPL(x86_pred_cmd);

0 commit comments

Comments
 (0)