Skip to content

Commit

Permalink
x86_32: remove unnecessary use of %ebx as the boot cpu flag
Browse files Browse the repository at this point in the history
Currently in head_32.S there are two ways we test to see if we
are the boot cpu.  By looking at %ebx and by looking at the
static variable ready.  When changing things around I have
found that it gets tricky to preserve %ebx.  So this
patch just switches head.S over to the more reliable
test of always using ready.

Hopefully later we can kill these tests entirely.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Mika Penttilä <mika.penttila@kolumbus.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
ijc authored and Ingo Molnar committed Jan 30, 2008
1 parent 4323838 commit 5035950
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions arch/x86/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ default_entry:
addl $0x67, %eax /* 0x67 == _PAGE_TABLE */
movl %eax, 4092(%edx)

xorl %ebx,%ebx /* This is the boot CPU (BSP) */
jmp 3f
/*
* Non-boot CPU entry point; entered from trampoline.S
Expand Down Expand Up @@ -268,10 +267,6 @@ ENTRY(startup_32_smp)
wrmsr

6:
/* This is a secondary processor (AP) */
xorl %ebx,%ebx
incl %ebx

#endif /* CONFIG_SMP */
3:

Expand All @@ -297,7 +292,7 @@ ENTRY(startup_32_smp)
popfl

#ifdef CONFIG_SMP
andl %ebx,%ebx
cmpb $0, ready
jz 1f /* Initial CPU cleans BSS */
jmp checkCPUtype
1:
Expand Down

0 comments on commit 5035950

Please sign in to comment.