diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-03-25 10:30:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:10:54 -0500 |
commit | e57113bc1ff591005ec0b0fb4885d97c01de73d8 (patch) | |
tree | 5e383dc4bdb5decf06adecca6da76fec6cbaa7d8 /arch/x86_64/kernel/head.S | |
parent | 1f50249e940baa7133e0bdb32cd564bb3ba28456 (diff) |
[PATCH] x86_64: miscellaneous cleanup
- adjust limits of GDT/IDT pseudo-descriptors (some were off by one)
- move empty_zero_page into .bss.page_aligned
- move cpu_gdt_table into .data.page_aligned
- move idt_table into .bss
- align inital_code and init_rsp
- eliminate pointless (re-)declaration of idt_table in traps.c
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/head.S')
-rw-r--r-- | arch/x86_64/kernel/head.S | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 02fc7fa0ea28..0cddcc038422 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -192,7 +192,8 @@ startup_64: | |||
192 | movq initial_code(%rip),%rax | 192 | movq initial_code(%rip),%rax |
193 | jmp *%rax | 193 | jmp *%rax |
194 | 194 | ||
195 | /* SMP bootup changes these two */ | 195 | /* SMP bootup changes these two */ |
196 | .align 8 | ||
196 | .globl initial_code | 197 | .globl initial_code |
197 | initial_code: | 198 | initial_code: |
198 | .quad x86_64_start_kernel | 199 | .quad x86_64_start_kernel |
@@ -237,7 +238,7 @@ ENTRY(no_long_mode) | |||
237 | .org 0xf00 | 238 | .org 0xf00 |
238 | .globl pGDT32 | 239 | .globl pGDT32 |
239 | pGDT32: | 240 | pGDT32: |
240 | .word gdt_end-cpu_gdt_table | 241 | .word gdt_end-cpu_gdt_table-1 |
241 | .long cpu_gdt_table-__START_KERNEL_map | 242 | .long cpu_gdt_table-__START_KERNEL_map |
242 | 243 | ||
243 | .org 0xf10 | 244 | .org 0xf10 |
@@ -293,8 +294,6 @@ NEXT_PAGE(level2_kernel_pgt) | |||
293 | /* Module mapping starts here */ | 294 | /* Module mapping starts here */ |
294 | .fill 492,8,0 | 295 | .fill 492,8,0 |
295 | 296 | ||
296 | NEXT_PAGE(empty_zero_page) | ||
297 | |||
298 | NEXT_PAGE(level3_physmem_pgt) | 297 | NEXT_PAGE(level3_physmem_pgt) |
299 | .quad phys_level2_kernel_pgt | 0x007 /* so that __va works even before pagetable_init */ | 298 | .quad phys_level2_kernel_pgt | 0x007 /* so that __va works even before pagetable_init */ |
300 | .fill 511,8,0 | 299 | .fill 511,8,0 |
@@ -337,7 +336,7 @@ ENTRY(boot_level4_pgt) | |||
337 | .align 16 | 336 | .align 16 |
338 | .globl cpu_gdt_descr | 337 | .globl cpu_gdt_descr |
339 | cpu_gdt_descr: | 338 | cpu_gdt_descr: |
340 | .word gdt_end-cpu_gdt_table | 339 | .word gdt_end-cpu_gdt_table-1 |
341 | gdt: | 340 | gdt: |
342 | .quad cpu_gdt_table | 341 | .quad cpu_gdt_table |
343 | #ifdef CONFIG_SMP | 342 | #ifdef CONFIG_SMP |
@@ -352,7 +351,8 @@ gdt: | |||
352 | * Also sysret mandates a special GDT layout | 351 | * Also sysret mandates a special GDT layout |
353 | */ | 352 | */ |
354 | 353 | ||
355 | .align PAGE_SIZE | 354 | .section .data.page_aligned, "aw" |
355 | .align PAGE_SIZE | ||
356 | 356 | ||
357 | /* The TLS descriptors are currently at a different place compared to i386. | 357 | /* The TLS descriptors are currently at a different place compared to i386. |
358 | Hopefully nobody expects them at a fixed place (Wine?) */ | 358 | Hopefully nobody expects them at a fixed place (Wine?) */ |
@@ -378,9 +378,12 @@ gdt_end: | |||
378 | /* zero the remaining page */ | 378 | /* zero the remaining page */ |
379 | .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0 | 379 | .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0 |
380 | 380 | ||
381 | ENTRY(idt_table) | 381 | .section .bss, "aw", @nobits |
382 | .rept 256 | 382 | .align L1_CACHE_BYTES |
383 | .quad 0 | 383 | ENTRY(idt_table) |
384 | .quad 0 | 384 | .skip 256 * 16 |
385 | .endr | ||
386 | 385 | ||
386 | .section .bss.page_aligned, "aw", @nobits | ||
387 | .align PAGE_SIZE | ||
388 | ENTRY(empty_zero_page) | ||
389 | .skip PAGE_SIZE | ||