diff options
Diffstat (limited to 'arch/x86/kernel/head_32.S')
-rw-r--r-- | arch/x86/kernel/head_32.S | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index fbad51fce672..5d8c5730686b 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | .text | 10 | .text |
11 | #include <linux/threads.h> | 11 | #include <linux/threads.h> |
12 | #include <linux/init.h> | ||
12 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
13 | #include <asm/segment.h> | 14 | #include <asm/segment.h> |
14 | #include <asm/page.h> | 15 | #include <asm/page.h> |
@@ -151,7 +152,9 @@ WEAK(xen_entry) | |||
151 | /* Unknown implementation; there's really | 152 | /* Unknown implementation; there's really |
152 | nothing we can do at this point. */ | 153 | nothing we can do at this point. */ |
153 | ud2a | 154 | ud2a |
154 | .data | 155 | |
156 | __INITDATA | ||
157 | |||
155 | subarch_entries: | 158 | subarch_entries: |
156 | .long default_entry /* normal x86/PC */ | 159 | .long default_entry /* normal x86/PC */ |
157 | .long lguest_entry /* lguest hypervisor */ | 160 | .long lguest_entry /* lguest hypervisor */ |
@@ -199,7 +202,6 @@ default_entry: | |||
199 | addl $0x67, %eax /* 0x67 == _PAGE_TABLE */ | 202 | addl $0x67, %eax /* 0x67 == _PAGE_TABLE */ |
200 | movl %eax, 4092(%edx) | 203 | movl %eax, 4092(%edx) |
201 | 204 | ||
202 | xorl %ebx,%ebx /* This is the boot CPU (BSP) */ | ||
203 | jmp 3f | 205 | jmp 3f |
204 | /* | 206 | /* |
205 | * Non-boot CPU entry point; entered from trampoline.S | 207 | * Non-boot CPU entry point; entered from trampoline.S |
@@ -222,6 +224,8 @@ ENTRY(startup_32_smp) | |||
222 | movl %eax,%es | 224 | movl %eax,%es |
223 | movl %eax,%fs | 225 | movl %eax,%fs |
224 | movl %eax,%gs | 226 | movl %eax,%gs |
227 | #endif /* CONFIG_SMP */ | ||
228 | 3: | ||
225 | 229 | ||
226 | /* | 230 | /* |
227 | * New page tables may be in 4Mbyte page mode and may | 231 | * New page tables may be in 4Mbyte page mode and may |
@@ -268,12 +272,6 @@ ENTRY(startup_32_smp) | |||
268 | wrmsr | 272 | wrmsr |
269 | 273 | ||
270 | 6: | 274 | 6: |
271 | /* This is a secondary processor (AP) */ | ||
272 | xorl %ebx,%ebx | ||
273 | incl %ebx | ||
274 | |||
275 | #endif /* CONFIG_SMP */ | ||
276 | 3: | ||
277 | 275 | ||
278 | /* | 276 | /* |
279 | * Enable paging | 277 | * Enable paging |
@@ -297,7 +295,7 @@ ENTRY(startup_32_smp) | |||
297 | popfl | 295 | popfl |
298 | 296 | ||
299 | #ifdef CONFIG_SMP | 297 | #ifdef CONFIG_SMP |
300 | andl %ebx,%ebx | 298 | cmpb $0, ready |
301 | jz 1f /* Initial CPU cleans BSS */ | 299 | jz 1f /* Initial CPU cleans BSS */ |
302 | jmp checkCPUtype | 300 | jmp checkCPUtype |
303 | 1: | 301 | 1: |
@@ -502,6 +500,7 @@ early_fault: | |||
502 | call printk | 500 | call printk |
503 | #endif | 501 | #endif |
504 | #endif | 502 | #endif |
503 | call dump_stack | ||
505 | hlt_loop: | 504 | hlt_loop: |
506 | hlt | 505 | hlt |
507 | jmp hlt_loop | 506 | jmp hlt_loop |