[PATCH] 2.3.23 patch to fix SMP kernel hang on UP machines

Kanoj Sarcar (kanoj@google.engr.sgi.com)
Wed, 27 Oct 1999 18:32:31 -0700 (PDT)


Linus,

This patch will let SMP kernels boot up on UP machines. Without
this patch, the kernel will hang. Please put into 2.3.24.

Thanks.

Kanoj

--- /usr/tmp/p_rdiff_a002BU/smpboot.c Wed Oct 27 18:28:50 1999
+++ arch/i386/kernel/smpboot.c Wed Oct 27 17:22:14 1999
@@ -821,8 +821,9 @@
* could use the real zero-page, but it's safer
* this way if some buggy code writes to this page ...
*/
- apic_phys = __pa(alloc_bootmem_pages(PAGE_SIZE));
+ apic_phys = (unsigned long)alloc_bootmem_pages(PAGE_SIZE);
memset((void *)apic_phys, 0, PAGE_SIZE);
+ apic_phys = __pa(apic_phys);
}
set_fixmap(FIX_APIC_BASE, apic_phys);
dprintk("mapped APIC to %08lx (%08lx)\n", APIC_BASE, apic_phys);
@@ -836,8 +837,9 @@
if (smp_found_config) {
ioapic_phys = mp_ioapics[i].mpc_apicaddr;
} else {
- ioapic_phys = __pa(alloc_bootmem_pages(PAGE_SIZE));
+ ioapic_phys = (unsigned long)alloc_bootmem_pages(PAGE_SIZE);
memset((void *)ioapic_phys, 0, PAGE_SIZE);
+ ioapic_phys = __pa(ioapic_phys);
}
set_fixmap(idx,ioapic_phys);
dprintk("mapped IOAPIC to %08lx (%08lx)\n",

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/