Skip to contentSkip to conversation

percpu i386 linker script update

PATCH In review Steven Rostedt 2 participants 3 messages Apr 14, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 5/5 percpu i386 linker script update

Add .data.percpu_offset section into arch/i386

arch/i386/kernel/vmlinux.lds.S +3 -0
Index: linux-2.6.17-rc1/arch/i386/kernel/vmlinux.lds.S
===================================================================
@@ -62,6 +62,9 @@ SECTIONS
   /* rarely changed data like cpu maps */
   . = ALIGN(32);
   .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { *(.data.read_mostly) }
+  __per_cpu_offset_start = .;
+  .data.percpu_offset  : AT(ADDR(.data.percpu_offset) - LOAD_OFFSET) { *(.data.percpu_offset) }
+  __per_cpu_offset_end = .;
   _edata = .;			/* End of data section */
 
   . = ALIGN(THREAD_SIZE);	/* init_task */
#1 lore raw
Quoted 9 lines · Steven Rostedt

Add .data.percpu_offset section into arch/i386

Index: linux-2.6.17-rc1/arch/i386/kernel/vmlinux.lds.S
===================================================================

arch/i386/kernel/vmlinux.lds.S SECTIONS · line 70

Quoted 9 lines
arch/i386/kernel/vmlinux.lds.S +3 -0
@@ -62,6 +62,9 @@ SECTIONS
   /* rarely changed data like cpu maps */
   . = ALIGN(32);
   .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { *(.data.read_mostly) }
+  __per_cpu_offset_start = .;
+  .data.percpu_offset  : AT(ADDR(.data.percpu_offset) - LOAD_OFFSET) { *(.data.percpu_offset) }
+  __per_cpu_offset_end = .;
   _edata = .;			/* End of data section */
 
   . = ALIGN(THREAD_SIZE);	/* init_task */

Can we please have this definition in:
include/asm-generic/vmlinux.lds.h

At least it looks to make sense for other arch's than just i386.

Something like
#define PERCPU_OFFSET \
...

Sam

#2 lore raw
Quoted 23 lines · Sam Ravnborg
Quoted 9 lines · Steven Rostedt

Add .data.percpu_offset section into arch/i386

Index: linux-2.6.17-rc1/arch/i386/kernel/vmlinux.lds.S
===================================================================

arch/i386/kernel/vmlinux.lds.S SECTIONS · line 70

Quoted 9 lines
arch/i386/kernel/vmlinux.lds.S +3 -0
@@ -62,6 +62,9 @@ SECTIONS
   /* rarely changed data like cpu maps */
   . = ALIGN(32);
   .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { *(.data.read_mostly) }
+  __per_cpu_offset_start = .;
+  .data.percpu_offset  : AT(ADDR(.data.percpu_offset) - LOAD_OFFSET) { *(.data.percpu_offset) }
+  __per_cpu_offset_end = .;
   _edata = .;			/* End of data section */
 
   . = ALIGN(THREAD_SIZE);	/* init_task */

Can we please have this definition in:
include/asm-generic/vmlinux.lds.h

Quoted 5 lines

At least it looks to make sense for other arch's than just i386.

Something like
#define PERCPU_OFFSET \
...

Sounds good, thanks!

-- Steve