Skip to content

Commit

Permalink
x86/smp: Move this_cpu_off to percpu hot section
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Brian Gerst authored and Ingo Molnar committed Mar 4, 2025
1 parent f3856cd commit 06aa030
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ do { \
#include <asm-generic/percpu.h>

/* We can use this directly for local CPU (faster). */
DECLARE_PER_CPU_READ_MOSTLY(unsigned long, this_cpu_off);
DECLARE_PER_CPU_CACHE_HOT(unsigned long, this_cpu_off);

#endif /* !__ASSEMBLY__ */

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/setup_percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
DEFINE_PER_CPU_CACHE_HOT(int, cpu_number);
EXPORT_PER_CPU_SYMBOL(cpu_number);

DEFINE_PER_CPU_READ_MOSTLY(unsigned long, this_cpu_off);
DEFINE_PER_CPU_CACHE_HOT(unsigned long, this_cpu_off);
EXPORT_PER_CPU_SYMBOL(this_cpu_off);

unsigned long __per_cpu_offset[NR_CPUS] __ro_after_init;
Expand Down

0 comments on commit 06aa030

Please sign in to comment.