diff options
| -rw-r--r-- | arch/x86/include/asm/mce.h | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/uv/uv_hub.h | 12 | ||||
| -rw-r--r-- | arch/x86/kernel/aperture_64.c | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 26 | ||||
| -rw-r--r-- | arch/x86/kernel/process.c | 2 | ||||
| -rw-r--r-- | arch/x86/xen/enlighten.c | 4 | ||||
| -rw-r--r-- | drivers/char/agp/amd64-agp.c | 5 |
7 files changed, 42 insertions, 11 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 858baa061cfc..6c3fdd631ed3 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
| @@ -108,10 +108,11 @@ struct mce_log { | |||
| 108 | #define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) | 108 | #define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) |
| 109 | #define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0) | 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 | #ifdef __KERNEL__ | 112 | #ifdef __KERNEL__ |
| 114 | 113 | ||
| 114 | extern struct atomic_notifier_head x86_mce_decoder_chain; | ||
| 115 | |||
| 115 | #include <linux/percpu.h> | 116 | #include <linux/percpu.h> |
| 116 | #include <linux/init.h> | 117 | #include <linux/init.h> |
| 117 | #include <asm/atomic.h> | 118 | #include <asm/atomic.h> |
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index bc54fa965af3..40be813fefb1 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h | |||
| @@ -495,5 +495,17 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) | |||
| 495 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); | 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 | #endif /* CONFIG_X86_64 */ | 510 | #endif /* CONFIG_X86_64 */ |
| 499 | #endif /* _ASM_X86_UV_UV_HUB_H */ | 511 | #endif /* _ASM_X86_UV_UV_HUB_H */ |
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 3704997e8b25..f147a95fd84a 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <asm/x86_init.h> | 31 | #include <asm/x86_init.h> |
| 32 | 32 | ||
| 33 | int gart_iommu_aperture; | 33 | int gart_iommu_aperture; |
| 34 | EXPORT_SYMBOL_GPL(gart_iommu_aperture); | ||
| 34 | int gart_iommu_aperture_disabled __initdata; | 35 | int gart_iommu_aperture_disabled __initdata; |
| 35 | int gart_iommu_aperture_allowed __initdata; | 36 | int gart_iommu_aperture_allowed __initdata; |
| 36 | 37 | ||
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 5f92494dab61..21db3cbea7dc 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
| @@ -36,6 +36,8 @@ DEFINE_PER_CPU(int, x2apic_extra_bits); | |||
| 36 | 36 | ||
| 37 | static enum uv_system_type uv_system_type; | 37 | static enum uv_system_type uv_system_type; |
| 38 | static u64 gru_start_paddr, gru_end_paddr; | 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 | static inline bool is_GRU_range(u64 start, u64 end) | 42 | static inline bool is_GRU_range(u64 start, u64 end) |
| 41 | { | 43 | { |
| @@ -55,12 +57,19 @@ static int early_get_nodeid(void) | |||
| 55 | mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); | 57 | mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); |
| 56 | node_id.v = *mmr; | 58 | node_id.v = *mmr; |
| 57 | early_iounmap(mmr, sizeof(*mmr)); | 59 | early_iounmap(mmr, sizeof(*mmr)); |
| 60 | |||
| 61 | /* Currently, all blades have same revision number */ | ||
| 62 | uv_min_hub_revision_id = node_id.s.revision; | ||
| 63 | |||
| 58 | return node_id.s.node_id; | 64 | return node_id.s.node_id; |
| 59 | } | 65 | } |
| 60 | 66 | ||
| 61 | static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 67 | static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
| 62 | { | 68 | { |
| 69 | int nodeid; | ||
| 70 | |||
| 63 | if (!strcmp(oem_id, "SGI")) { | 71 | if (!strcmp(oem_id, "SGI")) { |
| 72 | nodeid = early_get_nodeid(); | ||
| 64 | x86_platform.is_untracked_pat_range = uv_is_untracked_pat_range; | 73 | x86_platform.is_untracked_pat_range = uv_is_untracked_pat_range; |
| 65 | if (!strcmp(oem_table_id, "UVL")) | 74 | if (!strcmp(oem_table_id, "UVL")) |
| 66 | uv_system_type = UV_LEGACY_APIC; | 75 | uv_system_type = UV_LEGACY_APIC; |
| @@ -68,7 +77,7 @@ static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
| 68 | uv_system_type = UV_X2APIC; | 77 | uv_system_type = UV_X2APIC; |
| 69 | else if (!strcmp(oem_table_id, "UVH")) { | 78 | else if (!strcmp(oem_table_id, "UVH")) { |
| 70 | __get_cpu_var(x2apic_extra_bits) = | 79 | __get_cpu_var(x2apic_extra_bits) = |
| 71 | early_get_nodeid() << (UV_APIC_PNODE_SHIFT - 1); | 80 | nodeid << (UV_APIC_PNODE_SHIFT - 1); |
| 72 | uv_system_type = UV_NON_UNIQUE_APIC; | 81 | uv_system_type = UV_NON_UNIQUE_APIC; |
| 73 | return 1; | 82 | return 1; |
| 74 | } | 83 | } |
| @@ -374,13 +383,13 @@ static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size) | |||
| 374 | 383 | ||
| 375 | enum map_type {map_wb, map_uc}; | 384 | enum map_type {map_wb, map_uc}; |
| 376 | 385 | ||
| 377 | static __init void map_high(char *id, unsigned long base, int shift, | 386 | static __init void map_high(char *id, unsigned long base, int pshift, |
| 378 | int max_pnode, enum map_type map_type) | 387 | int bshift, int max_pnode, enum map_type map_type) |
| 379 | { | 388 | { |
| 380 | unsigned long bytes, paddr; | 389 | unsigned long bytes, paddr; |
| 381 | 390 | ||
| 382 | paddr = base << shift; | 391 | paddr = base << pshift; |
| 383 | bytes = (1UL << shift) * (max_pnode + 1); | 392 | bytes = (1UL << bshift) * (max_pnode + 1); |
| 384 | printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, | 393 | printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, |
| 385 | paddr + bytes); | 394 | paddr + bytes); |
| 386 | if (map_type == map_uc) | 395 | if (map_type == map_uc) |
| @@ -396,7 +405,7 @@ static __init void map_gru_high(int max_pnode) | |||
| 396 | 405 | ||
| 397 | gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); | 406 | gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); |
| 398 | if (gru.s.enable) { | 407 | if (gru.s.enable) { |
| 399 | map_high("GRU", gru.s.base, shift, max_pnode, map_wb); | 408 | map_high("GRU", gru.s.base, shift, shift, max_pnode, map_wb); |
| 400 | gru_start_paddr = ((u64)gru.s.base << shift); | 409 | gru_start_paddr = ((u64)gru.s.base << shift); |
| 401 | gru_end_paddr = gru_start_paddr + (1UL << shift) * (max_pnode + 1); | 410 | gru_end_paddr = gru_start_paddr + (1UL << shift) * (max_pnode + 1); |
| 402 | 411 | ||
| @@ -410,7 +419,7 @@ static __init void map_mmr_high(int max_pnode) | |||
| 410 | 419 | ||
| 411 | mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); | 420 | mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); |
| 412 | if (mmr.s.enable) | 421 | if (mmr.s.enable) |
| 413 | map_high("MMR", mmr.s.base, shift, max_pnode, map_uc); | 422 | map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc); |
| 414 | } | 423 | } |
| 415 | 424 | ||
| 416 | static __init void map_mmioh_high(int max_pnode) | 425 | static __init void map_mmioh_high(int max_pnode) |
| @@ -420,7 +429,8 @@ static __init void map_mmioh_high(int max_pnode) | |||
| 420 | 429 | ||
| 421 | mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); | 430 | mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); |
| 422 | if (mmioh.s.enable) | 431 | if (mmioh.s.enable) |
| 423 | map_high("MMIOH", mmioh.s.base, shift, max_pnode, map_uc); | 432 | map_high("MMIOH", mmioh.s.base, shift, mmioh.s.m_io, |
| 433 | max_pnode, map_uc); | ||
| 424 | } | 434 | } |
| 425 | 435 | ||
| 426 | static __init void map_low_mmrs(void) | 436 | static __init void map_low_mmrs(void) |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index c6ee241c8a98..02c3ee013ccd 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -288,6 +288,8 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | |||
| 288 | regs.es = __USER_DS; | 288 | regs.es = __USER_DS; |
| 289 | regs.fs = __KERNEL_PERCPU; | 289 | regs.fs = __KERNEL_PERCPU; |
| 290 | regs.gs = __KERNEL_STACK_CANARY; | 290 | regs.gs = __KERNEL_STACK_CANARY; |
| 291 | #else | ||
| 292 | regs.ss = __KERNEL_DS; | ||
| 291 | #endif | 293 | #endif |
| 292 | 294 | ||
| 293 | regs.orig_ax = -1; | 295 | regs.orig_ax = -1; |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 2b26dd5930c6..36daccb68642 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -1151,9 +1151,13 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 1151 | 1151 | ||
| 1152 | /* keep using Xen gdt for now; no urgent need to change it */ | 1152 | /* keep using Xen gdt for now; no urgent need to change it */ |
| 1153 | 1153 | ||
| 1154 | #ifdef CONFIG_X86_32 | ||
| 1154 | pv_info.kernel_rpl = 1; | 1155 | pv_info.kernel_rpl = 1; |
| 1155 | if (xen_feature(XENFEAT_supervisor_mode_kernel)) | 1156 | if (xen_feature(XENFEAT_supervisor_mode_kernel)) |
| 1156 | pv_info.kernel_rpl = 0; | 1157 | pv_info.kernel_rpl = 0; |
| 1158 | #else | ||
| 1159 | pv_info.kernel_rpl = 0; | ||
| 1160 | #endif | ||
| 1157 | 1161 | ||
| 1158 | /* set the limit of our address space */ | 1162 | /* set the limit of our address space */ |
| 1159 | xen_reserve_top(); | 1163 | xen_reserve_top(); |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 5aa7a586a7ff..1afb8968a342 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
| @@ -725,12 +725,11 @@ static struct pci_driver agp_amd64_pci_driver = { | |||
| 725 | int __init agp_amd64_init(void) | 725 | int __init agp_amd64_init(void) |
| 726 | { | 726 | { |
| 727 | int err = 0; | 727 | int err = 0; |
| 728 | static int done = 0; | ||
| 729 | 728 | ||
| 730 | if (agp_off) | 729 | if (agp_off) |
| 731 | return -EINVAL; | 730 | return -EINVAL; |
| 732 | 731 | ||
| 733 | if (done++) | 732 | if (gart_iommu_aperture) |
| 734 | return agp_bridges_found ? 0 : -ENODEV; | 733 | return agp_bridges_found ? 0 : -ENODEV; |
| 735 | 734 | ||
| 736 | err = pci_register_driver(&agp_amd64_pci_driver); | 735 | err = pci_register_driver(&agp_amd64_pci_driver); |
| @@ -771,6 +770,8 @@ int __init agp_amd64_init(void) | |||
| 771 | 770 | ||
| 772 | static void __exit agp_amd64_cleanup(void) | 771 | static void __exit agp_amd64_cleanup(void) |
| 773 | { | 772 | { |
| 773 | if (gart_iommu_aperture) | ||
| 774 | return; | ||
| 774 | if (aperture_resource) | 775 | if (aperture_resource) |
| 775 | release_resource(aperture_resource); | 776 | release_resource(aperture_resource); |
| 776 | pci_unregister_driver(&agp_amd64_pci_driver); | 777 | pci_unregister_driver(&agp_amd64_pci_driver); |
