aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/apic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-21 12:05:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-21 12:05:19 -0400
commitb3727c24da69971503a4ca98b3b877753c6a4393 (patch)
treec57015b202fec5a388010c3899ac6f99ed942996 /arch/x86/kernel/apic/apic.c
parent58e75a09732be9b850357ba3489bcfb103230b27 (diff)
parent6399c087458859cddff2d6b46befb95b866df3e0 (diff)
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: Print the hypervisor returned tsc_khz during boot x86: Correct segment permission flags in 64-bit linker script x86: cpuinit-annotate SMP boot trampolines properly x86: Increase timeout for EHCI debug port reset completion in early printk x86: Fix uaccess_32.h typo x86: Trivial whitespace cleanups x86, apic: Fix missed handling of discrete apics x86/i386: Remove duplicated #include x86, mtrr: Convert loop to a while based construct, avoid naked semicolon Revert 'x86: Fix system crash when loading with "reservetop" parameter' x86, mce: Fix compile warning in case of CONFIG_SMP=n x86, apic: Use logical flat on intel with <= 8 logical cpus x86: SGI UV: Map MMIO-High memory range x86: SGI UV: Add volatile semantics to macros that access chipset registers x86: SGI UV: Fix IPI macros x86: apic: Convert BUG() to BUG_ON() x86: Remove final bits of CONFIG_X86_OLD_MCE
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r--arch/x86/kernel/apic/apic.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index a34601f52987..a58ef98be155 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -62,7 +62,7 @@ unsigned int boot_cpu_physical_apicid = -1U;
62/* 62/*
63 * The highest APIC ID seen during enumeration. 63 * The highest APIC ID seen during enumeration.
64 * 64 *
65 * This determines the messaging protocol we can use: if all APIC IDs 65 * On AMD, this determines the messaging protocol we can use: if all APIC IDs
66 * are in the 0 ... 7 range, then we can use logical addressing which 66 * are in the 0 ... 7 range, then we can use logical addressing which
67 * has some performance advantages (better broadcasting). 67 * has some performance advantages (better broadcasting).
68 * 68 *
@@ -979,7 +979,7 @@ void lapic_shutdown(void)
979{ 979{
980 unsigned long flags; 980 unsigned long flags;
981 981
982 if (!cpu_has_apic) 982 if (!cpu_has_apic && !apic_from_smp_config())
983 return; 983 return;
984 984
985 local_irq_save(flags); 985 local_irq_save(flags);
@@ -1197,8 +1197,7 @@ void __cpuinit setup_local_APIC(void)
1197 * Double-check whether this APIC is really registered. 1197 * Double-check whether this APIC is really registered.
1198 * This is meaningless in clustered apic mode, so we skip it. 1198 * This is meaningless in clustered apic mode, so we skip it.
1199 */ 1199 */
1200 if (!apic->apic_id_registered()) 1200 BUG_ON(!apic->apic_id_registered());
1201 BUG();
1202 1201
1203 /* 1202 /*
1204 * Intel recommends to set DFR, LDR and TPR before enabling 1203 * Intel recommends to set DFR, LDR and TPR before enabling
@@ -1917,24 +1916,14 @@ void __cpuinit generic_processor_info(int apicid, int version)
1917 max_physical_apicid = apicid; 1916 max_physical_apicid = apicid;
1918 1917
1919#ifdef CONFIG_X86_32 1918#ifdef CONFIG_X86_32
1920 /* 1919 switch (boot_cpu_data.x86_vendor) {
1921 * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y 1920 case X86_VENDOR_INTEL:
1922 * but we need to work other dependencies like SMP_SUSPEND etc 1921 if (num_processors > 8)
1923 * before this can be done without some confusion. 1922 def_to_bigsmp = 1;
1924 * if (CPU_HOTPLUG_ENABLED || num_processors > 8) 1923 break;
1925 * - Ashok Raj <ashok.raj@intel.com> 1924 case X86_VENDOR_AMD:
1926 */ 1925 if (max_physical_apicid >= 8)
1927 if (max_physical_apicid >= 8) {
1928 switch (boot_cpu_data.x86_vendor) {
1929 case X86_VENDOR_INTEL:
1930 if (!APIC_XAPIC(version)) {
1931 def_to_bigsmp = 0;
1932 break;
1933 }
1934 /* If P4 and above fall through */
1935 case X86_VENDOR_AMD:
1936 def_to_bigsmp = 1; 1926 def_to_bigsmp = 1;
1937 }
1938 } 1927 }
1939#endif 1928#endif
1940 1929