]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] i386: Rename cpu_gdt_descr and remove extern declaration from smpboot.c
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Feb 2007 12:26:26 +0000 (13:26 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 13 Feb 2007 12:26:26 +0000 (13:26 +0100)
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>
===================================================================

arch/i386/kernel/head.S
arch/i386/kernel/smpboot.c
include/asm-i386/desc.h

index b322f72ffaadd894db6469c9e063fb1345e8e2c5..3fa7f9389afe7a39ce327ed5e4cf8493dfe7cf8e 100644 (file)
@@ -319,7 +319,7 @@ is386:      movl $2,%ecx            # set MP
 
        call check_x87
        call setup_pda
-       lgdt cpu_gdt_descr
+       lgdt early_gdt_descr
        lidt idt_descr
        ljmp $(__KERNEL_CS),$1f
 1:     movl $(__KERNEL_DS),%eax        # reload all the segment registers
@@ -375,7 +375,7 @@ ENTRY(setup_pda)
        movl start_pda, %eax
 
        /* slot the PDA address into the GDT */
-       mov cpu_gdt_descr+2, %ecx
+       mov early_gdt_descr+2, %ecx
        mov %ax, (__KERNEL_PDA+0+2)(%ecx)               /* base & 0x0000ffff */
        shr $16, %eax
        mov %al, (__KERNEL_PDA+4+0)(%ecx)               /* base & 0x00ff0000 */
@@ -597,7 +597,7 @@ idt_descr:
 
 # boot GDT descriptor (later on used by CPU#0):
        .word 0                         # 32 bit align gdt_desc.address
-ENTRY(cpu_gdt_descr)
+ENTRY(early_gdt_descr)
        .word GDT_ENTRIES*8-1
        .long cpu_gdt_table
 
index 5a00b07e71944c660f9b0be8a67085c4b9f1d187..f46a4d095e6cb3d81ccf6c0f494a606522d89d1e 100644 (file)
@@ -623,7 +623,6 @@ extern struct {
        unsigned short ss;
 } stack_start;
 extern struct i386_pda *start_pda;
-extern struct Xgt_desc_struct cpu_gdt_descr;
 
 #ifdef CONFIG_NUMA
 
index f398cc456448187bff38c53ad81a314d2d063212..050831f34f71ce8f2001872c41b982c61262043e 100644 (file)
@@ -22,7 +22,7 @@ struct Xgt_desc_struct {
 
 extern struct Xgt_desc_struct idt_descr;
 DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr);
-
+extern struct Xgt_desc_struct early_gdt_descr;
 
 static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
 {