From: Mikael Pettersson <mikpe@user.it.uu.se>
To: marcelo@conectiva.com.br, alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] local APIC init fixes for 2.4.21-pre5
Date: Thu, 27 Feb 2003 15:48:36 +0100 [thread overview]
Message-ID: <15966.9540.641385.149104@gargle.gargle.HOWL> (raw)
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();
reply other threads:[~2003-02-27 14:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15966.9540.641385.149104@gargle.gargle.HOWL \
--to=mikpe@user.it.uu.se \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®