Skip to contentSkip to conversation

percpu -v2 vmlinux.lds.h percpu_offset macro

PATCH New Steven Rostedt 1 participant 1 message Apr 15, 2006 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 5/8 percpu -v2 vmlinux.lds.h percpu_offset macro

Added macro PERCPU_OFFSET to be inserted in the architectures.

include/asm-generic/vmlinux.lds.h +8 -0
Index: linux-2.6.17-rc1/include/asm-generic/vmlinux.lds.h
===================================================================
@@ -166,3 +166,11 @@
 		.stab.index 0 : { *(.stab.index) }			\
 		.stab.indexstr 0 : { *(.stab.indexstr) }		\
 		.comment 0 : { *(.comment) }
+
+		/* Per CPU offsets */
+#define PERCPU_OFFSET							\
+		__per_cpu_offset_start = .;				\
+		.data.percpu_offset : AT(ADDR(.data.percpu_offset) - LOAD_OFFSET) { \
+			*(.data.percpu_offset)				\
+		}							\
+		__per_cpu_offset_end = .;