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, apic: Don't use logical-flat mode when CPU hotplug may exceed 8 CPUs
x86-32: Make AT_VECTOR_SIZE_ARCH=2
x86/agp: Fix amd64-agp module initialization regression
x86, doc: Fix minor spelling error in arch/x86/mm/gup.c

+35 -38
+2 -2
arch/x86/include/asm/system.h
··· 11 #include <linux/irqflags.h> 12 13 /* entries in ARCH_DLINFO: */ 14 - #ifdef CONFIG_IA32_EMULATION 15 # define AT_VECTOR_SIZE_ARCH 2 16 - #else 17 # define AT_VECTOR_SIZE_ARCH 1 18 #endif 19
··· 11 #include <linux/irqflags.h> 12 13 /* entries in ARCH_DLINFO: */ 14 + #if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64) 15 # define AT_VECTOR_SIZE_ARCH 2 16 + #else /* else it's non-compat x86-64 */ 17 # define AT_VECTOR_SIZE_ARCH 1 18 #endif 19
-5
arch/x86/kernel/acpi/boot.c
··· 1185 if (!error) { 1186 acpi_lapic = 1; 1187 1188 - #ifdef CONFIG_X86_BIGSMP 1189 - generic_bigsmp_probe(); 1190 - #endif 1191 /* 1192 * Parse MADT IO-APIC entries 1193 */ ··· 1194 acpi_ioapic = 1; 1195 1196 smp_found_config = 1; 1197 - if (apic->setup_apic_routing) 1198 - apic->setup_apic_routing(); 1199 } 1200 } 1201 if (error == -EINVAL) {
··· 1185 if (!error) { 1186 acpi_lapic = 1; 1187 1188 /* 1189 * Parse MADT IO-APIC entries 1190 */ ··· 1197 acpi_ioapic = 1; 1198 1199 smp_found_config = 1; 1200 } 1201 } 1202 if (error == -EINVAL) {
-17
arch/x86/kernel/apic/apic.c
··· 1641 #endif 1642 1643 enable_IR_x2apic(); 1644 - #ifdef CONFIG_X86_64 1645 default_setup_apic_routing(); 1646 - #endif 1647 1648 verify_local_APIC(); 1649 connect_bsp_APIC(); ··· 1888 } 1889 if (apicid > max_physical_apicid) 1890 max_physical_apicid = apicid; 1891 - 1892 - #ifdef CONFIG_X86_32 1893 - if (num_processors > 8) { 1894 - switch (boot_cpu_data.x86_vendor) { 1895 - case X86_VENDOR_INTEL: 1896 - if (!APIC_XAPIC(version)) { 1897 - def_to_bigsmp = 0; 1898 - break; 1899 - } 1900 - /* If P4 and above fall through */ 1901 - case X86_VENDOR_AMD: 1902 - def_to_bigsmp = 1; 1903 - } 1904 - } 1905 - #endif 1906 1907 #if defined(CONFIG_SMP) || defined(CONFIG_X86_64) 1908 early_per_cpu(x86_cpu_to_apicid, cpu) = apicid;
··· 1641 #endif 1642 1643 enable_IR_x2apic(); 1644 default_setup_apic_routing(); 1645 1646 verify_local_APIC(); 1647 connect_bsp_APIC(); ··· 1890 } 1891 if (apicid > max_physical_apicid) 1892 max_physical_apicid = apicid; 1893 1894 #if defined(CONFIG_SMP) || defined(CONFIG_X86_64) 1895 early_per_cpu(x86_cpu_to_apicid, cpu) = apicid;
+27 -2
arch/x86/kernel/apic/probe_32.c
··· 52 } 53 late_initcall(print_ipi_mode); 54 55 - void default_setup_apic_routing(void) 56 { 57 #ifdef CONFIG_X86_IO_APIC 58 printk(KERN_INFO ··· 128 .init_apic_ldr = default_init_apic_ldr, 129 130 .ioapic_phys_id_map = default_ioapic_phys_id_map, 131 - .setup_apic_routing = default_setup_apic_routing, 132 .multi_timer_check = NULL, 133 .apicid_to_node = default_apicid_to_node, 134 .cpu_to_logical_apicid = default_cpu_to_logical_apicid,
··· 52 } 53 late_initcall(print_ipi_mode); 54 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) 81 { 82 #ifdef CONFIG_X86_IO_APIC 83 printk(KERN_INFO ··· 103 .init_apic_ldr = default_init_apic_ldr, 104 105 .ioapic_phys_id_map = default_ioapic_phys_id_map, 106 + .setup_apic_routing = setup_apic_flat_routing, 107 .multi_timer_check = NULL, 108 .apicid_to_node = default_apicid_to_node, 109 .cpu_to_logical_apicid = default_cpu_to_logical_apicid,
+1 -1
arch/x86/kernel/apic/probe_64.c
··· 67 } 68 #endif 69 70 - if (apic == &apic_flat && num_processors > 8) 71 apic = &apic_physflat; 72 73 printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
··· 67 } 68 #endif 69 70 + if (apic == &apic_flat && num_possible_cpus() > 8) 71 apic = &apic_physflat; 72 73 printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
-7
arch/x86/kernel/mpparse.c
··· 359 x86_init.mpparse.mpc_record(1); 360 } 361 362 - #ifdef CONFIG_X86_BIGSMP 363 - generic_bigsmp_probe(); 364 - #endif 365 - 366 - if (apic->setup_apic_routing) 367 - apic->setup_apic_routing(); 368 - 369 if (!num_processors) 370 printk(KERN_ERR "MPTABLE: no processors registered!\n"); 371 return num_processors;
··· 359 x86_init.mpparse.mpc_record(1); 360 } 361 362 if (!num_processors) 363 printk(KERN_ERR "MPTABLE: no processors registered!\n"); 364 return num_processors;
-2
arch/x86/kernel/smpboot.c
··· 1083 set_cpu_sibling_map(0); 1084 1085 enable_IR_x2apic(); 1086 - #ifdef CONFIG_X86_64 1087 default_setup_apic_routing(); 1088 - #endif 1089 1090 if (smp_sanity_check(max_cpus) < 0) { 1091 printk(KERN_INFO "SMP disabled\n");
··· 1083 set_cpu_sibling_map(0); 1084 1085 enable_IR_x2apic(); 1086 default_setup_apic_routing(); 1087 1088 if (smp_sanity_check(max_cpus) < 0) { 1089 printk(KERN_INFO "SMP disabled\n");
+1 -1
arch/x86/mm/gup.c
··· 18 #else 19 /* 20 * With get_user_pages_fast, we walk down the pagetables without taking 21 - * any locks. For this we would like to load the pointers atoimcally, 22 * but that is not possible (without expensive cmpxchg8b) on PAE. What 23 * we do have is the guarantee that a pte will only either go from not 24 * present to present, or present to not present or both -- it will not
··· 18 #else 19 /* 20 * With get_user_pages_fast, we walk down the pagetables without taking 21 + * any locks. For this we would like to load the pointers atomically, 22 * but that is not possible (without expensive cmpxchg8b) on PAE. What 23 * we do have is the guarantee that a pte will only either go from not 24 * present to present, or present to not present or both -- it will not
+4 -1
drivers/char/agp/amd64-agp.c
··· 767 768 static int __init agp_amd64_mod_init(void) 769 { 770 if (gart_iommu_aperture) 771 return agp_bridges_found ? 0 : -ENODEV; 772 - 773 return agp_amd64_init(); 774 } 775 776 static void __exit agp_amd64_cleanup(void) 777 { 778 if (gart_iommu_aperture) 779 return; 780 if (aperture_resource) 781 release_resource(aperture_resource); 782 pci_unregister_driver(&agp_amd64_pci_driver);
··· 767 768 static int __init agp_amd64_mod_init(void) 769 { 770 + #ifndef MODULE 771 if (gart_iommu_aperture) 772 return agp_bridges_found ? 0 : -ENODEV; 773 + #endif 774 return agp_amd64_init(); 775 } 776 777 static void __exit agp_amd64_cleanup(void) 778 { 779 + #ifndef MODULE 780 if (gart_iommu_aperture) 781 return; 782 + #endif 783 if (aperture_resource) 784 release_resource(aperture_resource); 785 pci_unregister_driver(&agp_amd64_pci_driver);