Commit 2a57ff1a7051f0936b57342a57c25658d7ca3cc6
Committed by
Andi Kleen
1 parent
105fddb862
Exists in
master
and in
20 other branches
[PATCH] i386: Rename cpu_gdt_descr and remove extern declaration from smpboot.c
When I implemented the DECLARE_PER_CPU(var) macros, I was careful that people couldn't use "var" in a non-percpu context, by prepending percpu__. I never considered that this would allow them to overload the same name for a per-cpu and a non-percpu variable. It is only one of many horrors in the i386 boot code, but let's rename the non-perpcu cpu_gdt_descr to early_gdt_descr (not boot_gdt_descr, that's something else...) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andi Kleen <ak@suse.de> ===================================================================
Showing 3 changed files with 4 additions and 5 deletions Side-by-side Diff
arch/i386/kernel/head.S
... | ... | @@ -319,7 +319,7 @@ |
319 | 319 | |
320 | 320 | call check_x87 |
321 | 321 | call setup_pda |
322 | - lgdt cpu_gdt_descr | |
322 | + lgdt early_gdt_descr | |
323 | 323 | lidt idt_descr |
324 | 324 | ljmp $(__KERNEL_CS),$1f |
325 | 325 | 1: movl $(__KERNEL_DS),%eax # reload all the segment registers |
... | ... | @@ -375,7 +375,7 @@ |
375 | 375 | movl start_pda, %eax |
376 | 376 | |
377 | 377 | /* slot the PDA address into the GDT */ |
378 | - mov cpu_gdt_descr+2, %ecx | |
378 | + mov early_gdt_descr+2, %ecx | |
379 | 379 | mov %ax, (__KERNEL_PDA+0+2)(%ecx) /* base & 0x0000ffff */ |
380 | 380 | shr $16, %eax |
381 | 381 | mov %al, (__KERNEL_PDA+4+0)(%ecx) /* base & 0x00ff0000 */ |
... | ... | @@ -597,7 +597,7 @@ |
597 | 597 | |
598 | 598 | # boot GDT descriptor (later on used by CPU#0): |
599 | 599 | .word 0 # 32 bit align gdt_desc.address |
600 | -ENTRY(cpu_gdt_descr) | |
600 | +ENTRY(early_gdt_descr) | |
601 | 601 | .word GDT_ENTRIES*8-1 |
602 | 602 | .long cpu_gdt_table |
603 | 603 |
arch/i386/kernel/smpboot.c
include/asm-i386/desc.h