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, uv: Ensure hub revision set for all ACPI modes.
x86, uv: Add function retrieving node controller revision number
x86: xen: 64-bit kernel RPL should be 0
x86: kernel_thread() -- initialize SS to a known state
x86/agp: Fix agp_amd64_init and agp_amd64_cleanup
x86: SGI UV: Fix mapping of MMIO registers
x86: mce.h: Fix warning in header checks

+42 -11
+2 -1
arch/x86/include/asm/mce.h
··· 108 108 #define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) 109 109 #define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0) 110 110 111 - extern struct atomic_notifier_head x86_mce_decoder_chain; 112 111 113 112 #ifdef __KERNEL__ 113 + 114 + extern struct atomic_notifier_head x86_mce_decoder_chain; 114 115 115 116 #include <linux/percpu.h> 116 117 #include <linux/init.h>
+12
arch/x86/include/asm/uv/uv_hub.h
··· 495 495 uv_write_global_mmr64(pnode, UVH_IPI_INT, val); 496 496 } 497 497 498 + /* 499 + * Get the minimum revision number of the hub chips within the partition. 500 + * 1 - initial rev 1.0 silicon 501 + * 2 - rev 2.0 production silicon 502 + */ 503 + static inline int uv_get_min_hub_revision_id(void) 504 + { 505 + extern int uv_min_hub_revision_id; 506 + 507 + return uv_min_hub_revision_id; 508 + } 509 + 498 510 #endif /* CONFIG_X86_64 */ 499 511 #endif /* _ASM_X86_UV_UV_HUB_H */
+1
arch/x86/kernel/aperture_64.c
··· 31 31 #include <asm/x86_init.h> 32 32 33 33 int gart_iommu_aperture; 34 + EXPORT_SYMBOL_GPL(gart_iommu_aperture); 34 35 int gart_iommu_aperture_disabled __initdata; 35 36 int gart_iommu_aperture_allowed __initdata; 36 37
+18 -8
arch/x86/kernel/apic/x2apic_uv_x.c
··· 36 36 37 37 static enum uv_system_type uv_system_type; 38 38 static u64 gru_start_paddr, gru_end_paddr; 39 + int uv_min_hub_revision_id; 40 + EXPORT_SYMBOL_GPL(uv_min_hub_revision_id); 39 41 40 42 static inline bool is_GRU_range(u64 start, u64 end) 41 43 { ··· 57 55 mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); 58 56 node_id.v = *mmr; 59 57 early_iounmap(mmr, sizeof(*mmr)); 58 + 59 + /* Currently, all blades have same revision number */ 60 + uv_min_hub_revision_id = node_id.s.revision; 61 + 60 62 return node_id.s.node_id; 61 63 } 62 64 63 65 static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 64 66 { 67 + int nodeid; 68 + 65 69 if (!strcmp(oem_id, "SGI")) { 70 + nodeid = early_get_nodeid(); 66 71 x86_platform.is_untracked_pat_range = uv_is_untracked_pat_range; 67 72 if (!strcmp(oem_table_id, "UVL")) 68 73 uv_system_type = UV_LEGACY_APIC; ··· 77 68 uv_system_type = UV_X2APIC; 78 69 else if (!strcmp(oem_table_id, "UVH")) { 79 70 __get_cpu_var(x2apic_extra_bits) = 80 - early_get_nodeid() << (UV_APIC_PNODE_SHIFT - 1); 71 + nodeid << (UV_APIC_PNODE_SHIFT - 1); 81 72 uv_system_type = UV_NON_UNIQUE_APIC; 82 73 return 1; 83 74 } ··· 383 374 384 375 enum map_type {map_wb, map_uc}; 385 376 386 - static __init void map_high(char *id, unsigned long base, int shift, 387 - int max_pnode, enum map_type map_type) 377 + static __init void map_high(char *id, unsigned long base, int pshift, 378 + int bshift, int max_pnode, enum map_type map_type) 388 379 { 389 380 unsigned long bytes, paddr; 390 381 391 - paddr = base << shift; 392 - bytes = (1UL << shift) * (max_pnode + 1); 382 + paddr = base << pshift; 383 + bytes = (1UL << bshift) * (max_pnode + 1); 393 384 printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, 394 385 paddr + bytes); 395 386 if (map_type == map_uc) ··· 405 396 406 397 gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); 407 398 if (gru.s.enable) { 408 - map_high("GRU", gru.s.base, shift, max_pnode, map_wb); 399 + map_high("GRU", gru.s.base, shift, shift, max_pnode, map_wb); 409 400 gru_start_paddr = ((u64)gru.s.base << shift); 410 401 gru_end_paddr = gru_start_paddr + (1UL << shift) * (max_pnode + 1); 411 402 ··· 419 410 420 411 mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); 421 412 if (mmr.s.enable) 422 - map_high("MMR", mmr.s.base, shift, max_pnode, map_uc); 413 + map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc); 423 414 } 424 415 425 416 static __init void map_mmioh_high(int max_pnode) ··· 429 420 430 421 mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); 431 422 if (mmioh.s.enable) 432 - map_high("MMIOH", mmioh.s.base, shift, max_pnode, map_uc); 423 + map_high("MMIOH", mmioh.s.base, shift, mmioh.s.m_io, 424 + max_pnode, map_uc); 433 425 } 434 426 435 427 static __init void map_low_mmrs(void)
+2
arch/x86/kernel/process.c
··· 288 288 regs.es = __USER_DS; 289 289 regs.fs = __KERNEL_PERCPU; 290 290 regs.gs = __KERNEL_STACK_CANARY; 291 + #else 292 + regs.ss = __KERNEL_DS; 291 293 #endif 292 294 293 295 regs.orig_ax = -1;
+4
arch/x86/xen/enlighten.c
··· 1151 1151 1152 1152 /* keep using Xen gdt for now; no urgent need to change it */ 1153 1153 1154 + #ifdef CONFIG_X86_32 1154 1155 pv_info.kernel_rpl = 1; 1155 1156 if (xen_feature(XENFEAT_supervisor_mode_kernel)) 1156 1157 pv_info.kernel_rpl = 0; 1158 + #else 1159 + pv_info.kernel_rpl = 0; 1160 + #endif 1157 1161 1158 1162 /* set the limit of our address space */ 1159 1163 xen_reserve_top();
+3 -2
drivers/char/agp/amd64-agp.c
··· 725 725 int __init agp_amd64_init(void) 726 726 { 727 727 int err = 0; 728 - static int done = 0; 729 728 730 729 if (agp_off) 731 730 return -EINVAL; 732 731 733 - if (done++) 732 + if (gart_iommu_aperture) 734 733 return agp_bridges_found ? 0 : -ENODEV; 735 734 736 735 err = pci_register_driver(&agp_amd64_pci_driver); ··· 770 771 771 772 static void __exit agp_amd64_cleanup(void) 772 773 { 774 + if (gart_iommu_aperture) 775 + return; 773 776 if (aperture_resource) 774 777 release_resource(aperture_resource); 775 778 pci_unregister_driver(&agp_amd64_pci_driver);