diff options
author | 2009-08-28 19:32:32 -1000 | |
---|---|---|
committer | 2009-08-28 19:32:32 -1000 | |
commit | 4ed86af67e04cb5eb93faba589d102726207865a (patch) | |
tree | e3f3d6ed4c2465087d23050c770d236861920d2f /arch/x86/kernel | |
parent | Linux 2.6.31-rc8 (diff) | |
parent | x86: Fix vSMP boot crash (diff) | |
download | wireguard-linux-4ed86af67e04cb5eb93faba589d102726207865a.tar.xz wireguard-linux-4ed86af67e04cb5eb93faba589d102726207865a.zip |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Fix vSMP boot crash
x86, xen: Initialize cx to suppress warning
x86, xen: Suppress WP test on Xen
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/probe_64.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index bc3e880f9b82..fcec2f1d34a1 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c @@ -44,6 +44,11 @@ static struct apic *apic_probe[] __initdata = { NULL, }; +static int apicid_phys_pkg_id(int initial_apic_id, int index_msb) +{ + return hard_smp_processor_id() >> index_msb; +} + /* * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. */ @@ -69,6 +74,11 @@ void __init default_setup_apic_routing(void) printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); } + if (is_vsmp_box()) { + /* need to update phys_pkg_id */ + apic->phys_pkg_id = apicid_phys_pkg_id; + } + /* * Now that apic routing model is selected, configure the * fault handling for intr remapping. |