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