Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/smp: Move this_cpu_off to percpu hot section

No functional change.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250303165246.2175811-12-brgerst@gmail.com

authored by

Brian Gerst and committed by
Ingo Molnar
06aa0305 f3856cd3

+2 -2
+1 -1
arch/x86/include/asm/percpu.h
··· 586 586 #include <asm-generic/percpu.h> 587 587 588 588 /* We can use this directly for local CPU (faster). */ 589 - DECLARE_PER_CPU_READ_MOSTLY(unsigned long, this_cpu_off); 589 + DECLARE_PER_CPU_CACHE_HOT(unsigned long, this_cpu_off); 590 590 591 591 #endif /* !__ASSEMBLY__ */ 592 592
+1 -1
arch/x86/kernel/setup_percpu.c
··· 26 26 DEFINE_PER_CPU_CACHE_HOT(int, cpu_number); 27 27 EXPORT_PER_CPU_SYMBOL(cpu_number); 28 28 29 - DEFINE_PER_CPU_READ_MOSTLY(unsigned long, this_cpu_off); 29 + DEFINE_PER_CPU_CACHE_HOT(unsigned long, this_cpu_off); 30 30 EXPORT_PER_CPU_SYMBOL(this_cpu_off); 31 31 32 32 unsigned long __per_cpu_offset[NR_CPUS] __ro_after_init;