From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Bastian Blank <bastian@waldi.eu.org>,
Andreas Herrmann <andreas.herrmann3@amd.com>,
Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com
Subject: [PATCH] x86/amd: don't probe for extended APIC ID if APICs are disabled
Date: Wed, 22 Jul 2009 09:59:35 -0700 [thread overview]
Message-ID: <4A674577.4020206@goop.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0907221628110.2813@localhost.localdomain>
If we've logically disabled apics, don't probe the PCI space for the
AMD extended APIC ID.
[ Impact: prevent boot crash under Xen. ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Reported-by: Bastian Blank <bastian@waldi.eu.org>
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 28e5f59..e2485b0 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -356,7 +356,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
#endif
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI)
/* check CPU config space for extended APIC ID */
- if (c->x86 >= 0xf) {
+ if (cpu_has_apic && c->x86 >= 0xf) {
unsigned int val;
val = read_pci_config(0, 24, 0, 0x68);
if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18)))
prev parent reply other threads:[~2009-07-22 16:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 10:40 [PATCH] x86: detect use of extended APIC ID for AMD CPUs Andreas Herrmann
2009-06-07 14:42 ` [tip:x86/urgent] x86: Detect " tip-bot for Andreas Herrmann
2009-06-07 15:33 ` Ingo Molnar
2009-06-08 12:01 ` Andreas Herrmann
2009-06-08 13:12 ` [PATCH v2] x86: detect " Andreas Herrmann
2009-06-08 13:55 ` [PATCH v3] " Andreas Herrmann
2009-06-09 14:52 ` [tip:x86/urgent] x86: Detect " tip-bot for Andreas Herrmann
2009-06-07 18:46 ` Yinghai Lu
2009-06-08 12:18 ` Andreas Herrmann
2009-07-21 10:36 ` [PATCH] x86: detect " Bastian Blank
2009-07-21 16:56 ` Jeremy Fitzhardinge
2009-07-22 9:54 ` Bastian Blank
2009-07-22 14:29 ` Thomas Gleixner
2009-07-22 16:59 ` Jeremy Fitzhardinge [this message]
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=4A674577.4020206@goop.org \
--to=jeremy@goop.org \
--cc=andreas.herrmann3@amd.com \
--cc=bastian@waldi.eu.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=xen-devel@lists.xensource.com \
/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