[PATCH 1/2] [x86-64] align per-cpu section to configured cache bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[x86-64] align per-cpu section to configured cache bytes

Align the start of the per-cpu section to the configured number of bytes in a
cache line.  This stops a BUG_ON() from triggering in load_module() when
DEFINE_PER_CPU() is used in a module and the section isn't cacheline-aligned.
Rusty also found this and sent a patch in a while ago
(http://lkml.org/lkml/2004/10/19/17), I don't know what came of that.

  Signed-off-by: Zach Brown <[email protected]>
---

 arch/x86_64/kernel/vmlinux.lds.S |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.16-rc1-mm3-per-cpu-alignment/arch/x86_64/kernel/vmlinux.lds.S
===================================================================
--- 2.6.16-rc1-mm3-per-cpu-alignment.orig/arch/x86_64/kernel/vmlinux.lds.S	2006-01-27 10:19:49.000000000 -0800
+++ 2.6.16-rc1-mm3-per-cpu-alignment/arch/x86_64/kernel/vmlinux.lds.S	2006-01-27 11:41:36.000000000 -0800
@@ -173,7 +173,7 @@
   __initramfs_start = .;
   .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
   __initramfs_end = .;	
-  . = ALIGN(32);
+  . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
   __per_cpu_start = .;
   .data.percpu  : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
   __per_cpu_end = .;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux