From 32f5543d552793dfdc2576668422b7fbdf32d01c Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sat, 17 Jul 2004 06:48:50 -0700 Subject: [PATCH] [PATCH] Fix memory corruption at x86-64 SMP bootup This fixes a long standing corruption bug in the x86-64 code. The SMP trampoline would corrupt page 2, which was sometimes used for other data. This corrupted the ioport/iomem list in some cases and causes oopses while read /proc/iomem. Fix is to check the correct location and don't zero it afterwards because it gets reinitialized for the next CPU anyways. Thanks to Alexander Nyberg for tracking it down. --- arch/x86_64/kernel/smpboot.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 06937402b31c3..29f2578bf5e3f 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c @@ -659,7 +659,7 @@ static void __init do_boot_cpu (int apicid) Dprintk("CPU has booted.\n"); } else { boot_error = 1; - if (*((volatile unsigned char *)phys_to_virt(8192)) + if (*((volatile unsigned char *)phys_to_virt(SMP_TRAMPOLINE_BASE)) == 0xA5) /* trampoline started but...? */ printk("Stuck ??\n"); @@ -676,9 +676,6 @@ static void __init do_boot_cpu (int apicid) clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */ cpucount--; } - - /* mark "stuck" area as not stuck */ - *((volatile unsigned *)phys_to_virt(8192)) = 0; } cycles_t cacheflush_time; -- 2.53.0