aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@suse.de>2006-06-26 07:56:16 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 13:48:14 -0400
commitd167a51877e94dda73dd656c51f363502309f713 (patch)
treeeb02c2974b61777f575dfdc07d4c2adf83bde434 /arch/x86_64/kernel/vmlinux.lds.S
parent240cd6a80642da528bfa382ec2ae4e3cb8991ea7 (diff)
[PATCH] x86_64: x86_64 version of the smp alternative patch.
Changes are largely identical to the i386 version: * alternative #define are moved to the new alternative.h file. * one new elf section with pointers to the lock prefixes which can be nop'ed out for non-smp. * two new elf sections simliar to the "classic" alternatives to replace SMP code with simpler UP code. * fixup headers to use alternative.h instead of defining their own LOCK / LOCK_PREFIX macros. The patch reuses the i386 version of the alternatives code to avoid code duplication. The code in alternatives.c was shuffled around a bit to reduce the number of #ifdefs needed. It also got some tweaks needed for x86_64 (vsyscall page handling) and new features (noreplacement option which was x86_64 only up to now). Debug printk's are changed from compile-time to runtime. Loosely based on a early version from Bastian Blank <waldi@debian.org> Signed-off-by: Gerd Hoffmann <kraxel@suse.de> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/vmlinux.lds.S')
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index b81f473c4a19..5968c2415da9 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -131,6 +131,26 @@ SECTIONS
131 *(.data.page_aligned) 131 *(.data.page_aligned)
132 } 132 }
133 133
134 /* might get freed after init */
135 . = ALIGN(4096);
136 __smp_alt_begin = .;
137 __smp_alt_instructions = .;
138 .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) {
139 *(.smp_altinstructions)
140 }
141 __smp_alt_instructions_end = .;
142 . = ALIGN(8);
143 __smp_locks = .;
144 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
145 *(.smp_locks)
146 }
147 __smp_locks_end = .;
148 .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) {
149 *(.smp_altinstr_replacement)
150 }
151 . = ALIGN(4096);
152 __smp_alt_end = .;
153
134 . = ALIGN(4096); /* Init code and data */ 154 . = ALIGN(4096); /* Init code and data */
135 __init_begin = .; 155 __init_begin = .;
136 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { 156 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {