[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-9d16e78318f174fd4b07916a93e41749d5199267@git.kernel.org>
Date: Wed, 29 Apr 2009 09:05:29 GMT
From: tip-bot for Sam Ravnborg <sam@...nborg.org>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
torvalds@...ux-foundation.org, sam@...nborg.org, tabbott@....EDU,
tglx@...utronix.de, mingo@...e.hu
Subject: [tip:x86/kbuild] x86, vmlinux.lds: unify percpu
Commit-ID: 9d16e78318f174fd4b07916a93e41749d5199267
Gitweb: http://git.kernel.org/tip/9d16e78318f174fd4b07916a93e41749d5199267
Author: Sam Ravnborg <sam@...nborg.org>
AuthorDate: Wed, 29 Apr 2009 09:47:28 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 29 Apr 2009 10:20:34 +0200
x86, vmlinux.lds: unify percpu
32 bit:
- move __init_end outside the .bss output section
It really did not belong in there
[ Impact: 64-bit: cleanup, 32-bit: refactor linker script ]
Signed-off-by: Sam Ravnborg <sam@...nborg.org>
Cc: Tim Abbott <tabbott@....EDU>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
LKML-Reference: <1240991249-27117-12-git-send-email-sam@...nborg.org>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/kernel/vmlinux.lds.S | 30 ++++++++++++++++++++++++++++++
arch/x86/kernel/vmlinux_32.lds.S | 6 ------
arch/x86/kernel/vmlinux_64.lds.S | 26 --------------------------
3 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 1ab62a5..1ea2b85 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -330,6 +330,36 @@ SECTIONS
}
#endif
+#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
+ /*
+ * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
+ * output PHDR, so the next output section - __data_nosave - should
+ * start another section data.init2. Also, pda should be at the head of
+ * percpu area. Preallocate it and define the percpu offset symbol
+ * so that it can be accessed as a percpu variable.
+ */
+ . = ALIGN(PAGE_SIZE);
+ PERCPU_VADDR(0, :percpu)
+#else
+ PERCPU(PAGE_SIZE)
+#endif
+
+ . = ALIGN(PAGE_SIZE);
+ /* freed after init ends here */
+ __init_end = .;
+
+#ifdef CONFIG_X86_64
+ .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
+ . = ALIGN(PAGE_SIZE);
+ __nosave_begin = .;
+ *(.data.nosave)
+ . = ALIGN(PAGE_SIZE);
+ __nosave_end = .;
+ } :data.init2
+ /* use another section data.init2, see PERCPU_VADDR() above */
+#endif
+
+
#ifdef CONFIG_X86_32
# include "vmlinux_32.lds.S"
#else
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index 36c8fbd..d23ee2c 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -1,11 +1,5 @@
- PERCPU(PAGE_SIZE)
-
- . = ALIGN(PAGE_SIZE);
- /* freed after init ends here */
-
/* BSS */
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
- __init_end = .;
__bss_start = .;
*(.bss.page_aligned)
*(.bss)
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index 1aa5362..a539366 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -1,29 +1,3 @@
-#ifdef CONFIG_SMP
- /*
- * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
- * output PHDR, so the next output section - __data_nosave - should
- * start another section data.init2. Also, pda should be at the head of
- * percpu area. Preallocate it and define the percpu offset symbol
- * so that it can be accessed as a percpu variable.
- */
- . = ALIGN(PAGE_SIZE);
- PERCPU_VADDR(0, :percpu)
-#else
- PERCPU(PAGE_SIZE)
-#endif
-
- . = ALIGN(PAGE_SIZE);
- __init_end = .;
-
- .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
- . = ALIGN(PAGE_SIZE);
- __nosave_begin = .;
- *(.data.nosave)
- . = ALIGN(PAGE_SIZE);
- __nosave_end = .;
- } :data.init2
- /* use another section data.init2, see PERCPU_VADDR() above */
-
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE);
__bss_start = .; /* BSS */
--
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