Currently in head.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 <[EMAIL PROTECTED]>
---
 arch/i386/kernel/head.S |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index 9b10af6..aa9e28e 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -157,7 +157,6 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
        jb 10b
        movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
 
-       xorl %ebx,%ebx                          /* This is the boot CPU (BSP) */
        jmp 3f
 /*
  * Non-boot CPU entry point; entered from trampoline.S
@@ -228,10 +227,6 @@ ENTRY(startup_32_smp)
        wrmsr
 
 6:
-       /* This is a secondary processor (AP) */
-       xorl %ebx,%ebx
-       incl %ebx
-
 #endif /* CONFIG_SMP */
 3:
 
@@ -257,7 +252,7 @@ ENTRY(startup_32_smp)
        popfl
 
 #ifdef CONFIG_SMP
-       andl %ebx,%ebx
+       cmpb $0, ready
        jz  1f                          /* Initial CPU cleans BSS */
        jmp checkCPUtype
 1:
-- 
1.5.1.1.181.g2de0

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization

Reply via email to