diff options
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 31 |
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 | ||