diff options
author | Ananth N Mavinakayanahalli <ananth@in.ibm.com> | 2010-01-11 18:51:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-11 19:47:57 -0500 |
commit | 066000dd856709b6980123eb39b957fe26993f7b (patch) | |
tree | ba3a3ba8d7601234f5a554fd9eff38cd476025b1 | |
parent | 1b4d40a517e0657a081d5d63518c4badd31c60ea (diff) |
Revert "x86, apic: Use logical flat on intel with <= 8 logical cpus"
Revert commit 2fbd07a5f5d1295fa9b0c0564ec27da7c276a75a, as this commit
breaks an IBM platform with quad-core Xeon cpu's.
According to Suresh, this might be an IBM platform issue, as on other
Intel platforms with <= 8 logical cpu's, logical flat mode works fine
irespective of physical apic id values (inline with the xapic
architecture).
Revert this for now because of the IBM platform breakage.
Another version will be re-submitted after the complete analysis.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 26 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_64.c | 15 |
2 files changed, 22 insertions, 19 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index aa57c079c98f..e80f291472a4 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 | * On AMD, this determines the messaging protocol we can use: if all APIC IDs | 65 | * 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 | * |
@@ -1898,14 +1898,24 @@ void __cpuinit generic_processor_info(int apicid, int version) | |||
1898 | max_physical_apicid = apicid; | 1898 | max_physical_apicid = apicid; |
1899 | 1899 | ||
1900 | #ifdef CONFIG_X86_32 | 1900 | #ifdef CONFIG_X86_32 |
1901 | switch (boot_cpu_data.x86_vendor) { | 1901 | /* |
1902 | case X86_VENDOR_INTEL: | 1902 | * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y |
1903 | if (num_processors > 8) | 1903 | * but we need to work other dependencies like SMP_SUSPEND etc |
1904 | def_to_bigsmp = 1; | 1904 | * before this can be done without some confusion. |
1905 | break; | 1905 | * if (CPU_HOTPLUG_ENABLED || num_processors > 8) |
1906 | case X86_VENDOR_AMD: | 1906 | * - Ashok Raj <ashok.raj@intel.com> |
1907 | if (max_physical_apicid >= 8) | 1907 | */ |
1908 | if (max_physical_apicid >= 8) { | ||
1909 | switch (boot_cpu_data.x86_vendor) { | ||
1910 | case X86_VENDOR_INTEL: | ||
1911 | if (!APIC_XAPIC(version)) { | ||
1912 | def_to_bigsmp = 0; | ||
1913 | break; | ||
1914 | } | ||
1915 | /* If P4 and above fall through */ | ||
1916 | case X86_VENDOR_AMD: | ||
1908 | def_to_bigsmp = 1; | 1917 | def_to_bigsmp = 1; |
1918 | } | ||
1909 | } | 1919 | } |
1910 | #endif | 1920 | #endif |
1911 | 1921 | ||
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index c4cbd3080c1c..65edc180fc82 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c | |||
@@ -64,23 +64,16 @@ void __init default_setup_apic_routing(void) | |||
64 | apic = &apic_x2apic_phys; | 64 | apic = &apic_x2apic_phys; |
65 | else | 65 | else |
66 | apic = &apic_x2apic_cluster; | 66 | apic = &apic_x2apic_cluster; |
67 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); | ||
67 | } | 68 | } |
68 | #endif | 69 | #endif |
69 | 70 | ||
70 | if (apic == &apic_flat) { | 71 | if (apic == &apic_flat) { |
71 | switch (boot_cpu_data.x86_vendor) { | 72 | if (max_physical_apicid >= 8) |
72 | case X86_VENDOR_INTEL: | 73 | apic = &apic_physflat; |
73 | if (num_processors > 8) | 74 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); |
74 | apic = &apic_physflat; | ||
75 | break; | ||
76 | case X86_VENDOR_AMD: | ||
77 | if (max_physical_apicid >= 8) | ||
78 | apic = &apic_physflat; | ||
79 | } | ||
80 | } | 75 | } |
81 | 76 | ||
82 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); | ||
83 | |||
84 | if (is_vsmp_box()) { | 77 | if (is_vsmp_box()) { |
85 | /* need to update phys_pkg_id */ | 78 | /* need to update phys_pkg_id */ |
86 | apic->phys_pkg_id = apicid_phys_pkg_id; | 79 | apic->phys_pkg_id = apicid_phys_pkg_id; |