[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1301601122-25431-1-git-send-email-vapier@gentoo.org>
Date: Thu, 31 Mar 2011 15:52:01 -0400
From: Mike Frysinger <vapier@...too.org>
To: linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>
Cc: uclinux-dist-devel@...ckfin.uclinux.org
Subject: [PATCH 1/2] percpu: unify input section names
The two percpu helper macros have the section names duplicated. So create
a new define to merge the two. This also allows arches who need to link
things more directly themselves to avoid duplicating the input sections in
their linker script.
Signed-off-by: Mike Frysinger <vapier@...too.org>
---
include/asm-generic/vmlinux.lds.h | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fe77e33..7531278 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -682,6 +682,22 @@
}
/**
+ * PERCPU_INPUT - the percpu input sections
+ *
+ * The core percpu section names and core symbols which do not rely
+ * directly upon load addresses.
+ */
+#define PERCPU_INPUT \
+ VMLINUX_SYMBOL(__per_cpu_start) = .; \
+ *(.data..percpu..first) \
+ . = ALIGN(PAGE_SIZE); \
+ *(.data..percpu..page_aligned) \
+ *(.data..percpu..readmostly) \
+ *(.data..percpu) \
+ *(.data..percpu..shared_aligned) \
+ VMLINUX_SYMBOL(__per_cpu_end) = .;
+
+/**
* PERCPU_VADDR - define output section for percpu area
* @vaddr: explicit base address (optional)
* @phdr: destination PHDR (optional)
@@ -704,14 +720,7 @@
VMLINUX_SYMBOL(__per_cpu_load) = .; \
.data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
- LOAD_OFFSET) { \
- VMLINUX_SYMBOL(__per_cpu_start) = .; \
- *(.data..percpu..first) \
- . = ALIGN(PAGE_SIZE); \
- *(.data..percpu..page_aligned) \
- *(.data..percpu..readmostly) \
- *(.data..percpu) \
- *(.data..percpu..shared_aligned) \
- VMLINUX_SYMBOL(__per_cpu_end) = .; \
+ PERCPU_INPUT \
} phdr \
. = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu);
@@ -732,14 +741,7 @@
. = ALIGN(align); \
.data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__per_cpu_load) = .; \
- VMLINUX_SYMBOL(__per_cpu_start) = .; \
- *(.data..percpu..first) \
- . = ALIGN(PAGE_SIZE); \
- *(.data..percpu..page_aligned) \
- *(.data..percpu..readmostly) \
- *(.data..percpu) \
- *(.data..percpu..shared_aligned) \
- VMLINUX_SYMBOL(__per_cpu_end) = .; \
+ PERCPU_INPUT \
}
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists