diff options
Diffstat (limited to 'arch/x86')
-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/apic.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/apic/apic_flat_64.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_64.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/apic/x2apic_uv_x.c | 26 | ||||
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 4 |
10 files changed, 56 insertions, 34 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/apic.c b/arch/x86/kernel/apic/apic.c index e80f291472a4..3987e4408f75 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -61,12 +61,6 @@ unsigned int boot_cpu_physical_apicid = -1U; | |||
61 | 61 | ||
62 | /* | 62 | /* |
63 | * The highest APIC ID seen during enumeration. | 63 | * The highest APIC ID seen during enumeration. |
64 | * | ||
65 | * This determines the messaging protocol we can use: if all APIC IDs | ||
66 | * are in the 0 ... 7 range, then we can use logical addressing which | ||
67 | * has some performance advantages (better broadcasting). | ||
68 | * | ||
69 | * If there's an APIC ID above 8, we use physical addressing. | ||
70 | */ | 64 | */ |
71 | unsigned int max_physical_apicid; | 65 | unsigned int max_physical_apicid; |
72 | 66 | ||
@@ -1898,14 +1892,7 @@ void __cpuinit generic_processor_info(int apicid, int version) | |||
1898 | max_physical_apicid = apicid; | 1892 | max_physical_apicid = apicid; |
1899 | 1893 | ||
1900 | #ifdef CONFIG_X86_32 | 1894 | #ifdef CONFIG_X86_32 |
1901 | /* | 1895 | if (num_processors > 8) { |
1902 | * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y | ||
1903 | * but we need to work other dependencies like SMP_SUSPEND etc | ||
1904 | * before this can be done without some confusion. | ||
1905 | * if (CPU_HOTPLUG_ENABLED || num_processors > 8) | ||
1906 | * - Ashok Raj <ashok.raj@intel.com> | ||
1907 | */ | ||
1908 | if (max_physical_apicid >= 8) { | ||
1909 | switch (boot_cpu_data.x86_vendor) { | 1896 | switch (boot_cpu_data.x86_vendor) { |
1910 | case X86_VENDOR_INTEL: | 1897 | case X86_VENDOR_INTEL: |
1911 | if (!APIC_XAPIC(version)) { | 1898 | if (!APIC_XAPIC(version)) { |
diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c index eacbd2b31d27..e3c3d820c325 100644 --- a/arch/x86/kernel/apic/apic_flat_64.c +++ b/arch/x86/kernel/apic/apic_flat_64.c | |||
@@ -240,6 +240,11 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
240 | printk(KERN_DEBUG "system APIC only can use physical flat"); | 240 | printk(KERN_DEBUG "system APIC only can use physical flat"); |
241 | return 1; | 241 | return 1; |
242 | } | 242 | } |
243 | |||
244 | if (!strncmp(oem_id, "IBM", 3) && !strncmp(oem_table_id, "EXA", 3)) { | ||
245 | printk(KERN_DEBUG "IBM Summit detected, will use apic physical"); | ||
246 | return 1; | ||
247 | } | ||
243 | #endif | 248 | #endif |
244 | 249 | ||
245 | return 0; | 250 | return 0; |
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index 65edc180fc82..450fe2064a14 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c | |||
@@ -64,15 +64,13 @@ void __init default_setup_apic_routing(void) | |||
64 | apic = &apic_x2apic_phys; | 64 | apic = &apic_x2apic_phys; |
65 | else | 65 | else |
66 | apic = &apic_x2apic_cluster; | 66 | apic = &apic_x2apic_cluster; |
67 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); | ||
68 | } | 67 | } |
69 | #endif | 68 | #endif |
70 | 69 | ||
71 | if (apic == &apic_flat) { | 70 | if (apic == &apic_flat && num_processors > 8) |
72 | if (max_physical_apicid >= 8) | ||
73 | apic = &apic_physflat; | 71 | apic = &apic_physflat; |
74 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); | 72 | |
75 | } | 73 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); |
76 | 74 | ||
77 | if (is_vsmp_box()) { | 75 | if (is_vsmp_box()) { |
78 | /* need to update phys_pkg_id */ | 76 | /* need to update phys_pkg_id */ |
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/dumpstack.c b/arch/x86/kernel/dumpstack.c index c56bc2873030..6d817554780a 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -123,13 +123,15 @@ print_context_stack_bp(struct thread_info *tinfo, | |||
123 | while (valid_stack_ptr(tinfo, ret_addr, sizeof(*ret_addr), end)) { | 123 | while (valid_stack_ptr(tinfo, ret_addr, sizeof(*ret_addr), end)) { |
124 | unsigned long addr = *ret_addr; | 124 | unsigned long addr = *ret_addr; |
125 | 125 | ||
126 | if (__kernel_text_address(addr)) { | 126 | if (!__kernel_text_address(addr)) |
127 | ops->address(data, addr, 1); | 127 | break; |
128 | frame = frame->next_frame; | 128 | |
129 | ret_addr = &frame->return_address; | 129 | ops->address(data, addr, 1); |
130 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); | 130 | frame = frame->next_frame; |
131 | } | 131 | ret_addr = &frame->return_address; |
132 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); | ||
132 | } | 133 | } |
134 | |||
133 | return (unsigned long)frame; | 135 | return (unsigned long)frame; |
134 | } | 136 | } |
135 | EXPORT_SYMBOL_GPL(print_context_stack_bp); | 137 | EXPORT_SYMBOL_GPL(print_context_stack_bp); |
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(); |