* [PATCH] local APIC init fixes for 2.4.21-pre5
@ 2003-02-27 14:48 Mikael Pettersson
0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2003-02-27 14:48 UTC (permalink / raw)
To: marcelo, alan; +Cc: linux-kernel
Marcelo & Alan,
This patch for 2.4.21-pre fixes two local APIC initialisation bugs.
It has been reported to fix serious stability problems with UP kernels
on SMP Athlons. It needs to go in 2.4.21-pre & -ac as soon as possible.
Bug 1: APIC_init_uniprocessor() has a broken write to APIC_ID, forcing
APIC_ID to always be zero for the boot CPU. This causes serious
problems when running UP kernels on SMP Athlons. The fix is to remove
the write altogether, since it's redundant and potentially dangerous.
Bug 2: APIC_init_uniprocessor() incorrectly sets phys_cpu_present_map
to 1 instead of 1 << boot_cpu_physical_apicid. Any machine whose boot
CPU doesn't have ID zero will trigger a BUG() in setup_local_APIC().
The fix is to correct the initialisation of phys_cpu_present_map.
/Mikael
diff -ruN linux-2.4.21-pre5/arch/i386/kernel/apic.c linux-2.4.21-pre5.apic-fixes/arch/i386/kernel/apic.c
--- linux-2.4.21-pre5/arch/i386/kernel/apic.c 2003-02-27 12:58:55.000000000 +0100
+++ linux-2.4.21-pre5.apic-fixes/arch/i386/kernel/apic.c 2003-02-27 13:05:28.000000000 +0100
@@ -649,7 +649,6 @@
}
set_bit(X86_FEATURE_APIC, &boot_cpu_data.x86_capability);
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
- boot_cpu_physical_apicid = 0;
if (nmi_watchdog != NMI_NONE)
nmi_watchdog = NMI_LOCAL_APIC;
@@ -1169,8 +1168,7 @@
connect_bsp_APIC();
- phys_cpu_present_map = 1;
- apic_write_around(APIC_ID, boot_cpu_physical_apicid);
+ phys_cpu_present_map = 1 << boot_cpu_physical_apicid;
apic_pm_init2();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-27 14:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-27 14:48 [PATCH] local APIC init fixes for 2.4.21-pre5 Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®