diff options
Diffstat (limited to 'arch/x86/kernel/apic')
| -rw-r--r-- | arch/x86/kernel/apic/apic.c | 17 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/probe_32.c | 29 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/probe_64.c | 2 |
3 files changed, 28 insertions, 20 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 3987e4408f75..dfca210f6a10 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
| @@ -1641,9 +1641,7 @@ int __init APIC_init_uniprocessor(void) | |||
| 1641 | #endif | 1641 | #endif |
| 1642 | 1642 | ||
| 1643 | enable_IR_x2apic(); | 1643 | enable_IR_x2apic(); |
| 1644 | #ifdef CONFIG_X86_64 | ||
| 1645 | default_setup_apic_routing(); | 1644 | default_setup_apic_routing(); |
| 1646 | #endif | ||
| 1647 | 1645 | ||
| 1648 | verify_local_APIC(); | 1646 | verify_local_APIC(); |
| 1649 | connect_bsp_APIC(); | 1647 | connect_bsp_APIC(); |
| @@ -1891,21 +1889,6 @@ void __cpuinit generic_processor_info(int apicid, int version) | |||
| 1891 | if (apicid > max_physical_apicid) | 1889 | if (apicid > max_physical_apicid) |
| 1892 | max_physical_apicid = apicid; | 1890 | max_physical_apicid = apicid; |
| 1893 | 1891 | ||
| 1894 | #ifdef CONFIG_X86_32 | ||
| 1895 | if (num_processors > 8) { | ||
| 1896 | switch (boot_cpu_data.x86_vendor) { | ||
| 1897 | case X86_VENDOR_INTEL: | ||
| 1898 | if (!APIC_XAPIC(version)) { | ||
| 1899 | def_to_bigsmp = 0; | ||
| 1900 | break; | ||
| 1901 | } | ||
| 1902 | /* If P4 and above fall through */ | ||
| 1903 | case X86_VENDOR_AMD: | ||
| 1904 | def_to_bigsmp = 1; | ||
| 1905 | } | ||
| 1906 | } | ||
| 1907 | #endif | ||
| 1908 | |||
| 1909 | #if defined(CONFIG_SMP) || defined(CONFIG_X86_64) | 1892 | #if defined(CONFIG_SMP) || defined(CONFIG_X86_64) |
| 1910 | early_per_cpu(x86_cpu_to_apicid, cpu) = apicid; | 1893 | early_per_cpu(x86_cpu_to_apicid, cpu) = apicid; |
| 1911 | early_per_cpu(x86_bios_cpu_apicid, cpu) = apicid; | 1894 | early_per_cpu(x86_bios_cpu_apicid, cpu) = apicid; |
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c index 1a6559f6768c..99d2fe016084 100644 --- a/arch/x86/kernel/apic/probe_32.c +++ b/arch/x86/kernel/apic/probe_32.c | |||
| @@ -52,7 +52,32 @@ static int __init print_ipi_mode(void) | |||
| 52 | } | 52 | } |
| 53 | late_initcall(print_ipi_mode); | 53 | late_initcall(print_ipi_mode); |
| 54 | 54 | ||
| 55 | void default_setup_apic_routing(void) | 55 | void __init default_setup_apic_routing(void) |
| 56 | { | ||
| 57 | int version = apic_version[boot_cpu_physical_apicid]; | ||
| 58 | |||
| 59 | if (num_possible_cpus() > 8) { | ||
| 60 | switch (boot_cpu_data.x86_vendor) { | ||
| 61 | case X86_VENDOR_INTEL: | ||
| 62 | if (!APIC_XAPIC(version)) { | ||
| 63 | def_to_bigsmp = 0; | ||
| 64 | break; | ||
| 65 | } | ||
| 66 | /* If P4 and above fall through */ | ||
| 67 | case X86_VENDOR_AMD: | ||
| 68 | def_to_bigsmp = 1; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | #ifdef CONFIG_X86_BIGSMP | ||
| 73 | generic_bigsmp_probe(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | if (apic->setup_apic_routing) | ||
| 77 | apic->setup_apic_routing(); | ||
| 78 | } | ||
| 79 | |||
| 80 | static void setup_apic_flat_routing(void) | ||
| 56 | { | 81 | { |
| 57 | #ifdef CONFIG_X86_IO_APIC | 82 | #ifdef CONFIG_X86_IO_APIC |
| 58 | printk(KERN_INFO | 83 | printk(KERN_INFO |
| @@ -103,7 +128,7 @@ struct apic apic_default = { | |||
| 103 | .init_apic_ldr = default_init_apic_ldr, | 128 | .init_apic_ldr = default_init_apic_ldr, |
| 104 | 129 | ||
| 105 | .ioapic_phys_id_map = default_ioapic_phys_id_map, | 130 | .ioapic_phys_id_map = default_ioapic_phys_id_map, |
| 106 | .setup_apic_routing = default_setup_apic_routing, | 131 | .setup_apic_routing = setup_apic_flat_routing, |
| 107 | .multi_timer_check = NULL, | 132 | .multi_timer_check = NULL, |
| 108 | .apicid_to_node = default_apicid_to_node, | 133 | .apicid_to_node = default_apicid_to_node, |
| 109 | .cpu_to_logical_apicid = default_cpu_to_logical_apicid, | 134 | .cpu_to_logical_apicid = default_cpu_to_logical_apicid, |
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index 450fe2064a14..83e9be4778e2 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c | |||
| @@ -67,7 +67,7 @@ void __init default_setup_apic_routing(void) | |||
| 67 | } | 67 | } |
| 68 | #endif | 68 | #endif |
| 69 | 69 | ||
| 70 | if (apic == &apic_flat && num_processors > 8) | 70 | if (apic == &apic_flat && num_possible_cpus() > 8) |
| 71 | apic = &apic_physflat; | 71 | apic = &apic_physflat; |
| 72 | 72 | ||
| 73 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); | 73 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); |
