diff options
| -rw-r--r-- | arch/x86/include/asm/uaccess.h | 4 | ||||
| -rw-r--r-- | arch/x86/include/asm/uaccess_64.h | 10 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/amd.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/irqinit.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/mfgpt_32.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/reboot.c | 8 | ||||
| -rw-r--r-- | arch/x86/kernel/setup.c | 13 | ||||
| -rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 7 | ||||
| -rw-r--r-- | arch/x86/mm/srat_64.c | 6 |
10 files changed, 37 insertions, 23 deletions
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index 20e6a795e160..d2c6c930b491 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h | |||
| @@ -212,9 +212,9 @@ extern int __get_user_bad(void); | |||
| 212 | : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") | 212 | : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") |
| 213 | #else | 213 | #else |
| 214 | #define __put_user_asm_u64(x, ptr, retval, errret) \ | 214 | #define __put_user_asm_u64(x, ptr, retval, errret) \ |
| 215 | __put_user_asm(x, ptr, retval, "q", "", "Zr", errret) | 215 | __put_user_asm(x, ptr, retval, "q", "", "er", errret) |
| 216 | #define __put_user_asm_ex_u64(x, addr) \ | 216 | #define __put_user_asm_ex_u64(x, addr) \ |
| 217 | __put_user_asm_ex(x, addr, "q", "", "Zr") | 217 | __put_user_asm_ex(x, addr, "q", "", "er") |
| 218 | #define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu) | 218 | #define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu) |
| 219 | #endif | 219 | #endif |
| 220 | 220 | ||
diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index 8cc687326eb8..db24b215fc50 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h | |||
| @@ -88,11 +88,11 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size) | |||
| 88 | ret, "l", "k", "ir", 4); | 88 | ret, "l", "k", "ir", 4); |
| 89 | return ret; | 89 | return ret; |
| 90 | case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst, | 90 | case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst, |
| 91 | ret, "q", "", "ir", 8); | 91 | ret, "q", "", "er", 8); |
| 92 | return ret; | 92 | return ret; |
| 93 | case 10: | 93 | case 10: |
| 94 | __put_user_asm(*(u64 *)src, (u64 __user *)dst, | 94 | __put_user_asm(*(u64 *)src, (u64 __user *)dst, |
| 95 | ret, "q", "", "ir", 10); | 95 | ret, "q", "", "er", 10); |
| 96 | if (unlikely(ret)) | 96 | if (unlikely(ret)) |
| 97 | return ret; | 97 | return ret; |
| 98 | asm("":::"memory"); | 98 | asm("":::"memory"); |
| @@ -101,12 +101,12 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size) | |||
| 101 | return ret; | 101 | return ret; |
| 102 | case 16: | 102 | case 16: |
| 103 | __put_user_asm(*(u64 *)src, (u64 __user *)dst, | 103 | __put_user_asm(*(u64 *)src, (u64 __user *)dst, |
| 104 | ret, "q", "", "ir", 16); | 104 | ret, "q", "", "er", 16); |
| 105 | if (unlikely(ret)) | 105 | if (unlikely(ret)) |
| 106 | return ret; | 106 | return ret; |
| 107 | asm("":::"memory"); | 107 | asm("":::"memory"); |
| 108 | __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst, | 108 | __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst, |
| 109 | ret, "q", "", "ir", 8); | 109 | ret, "q", "", "er", 8); |
| 110 | return ret; | 110 | return ret; |
| 111 | default: | 111 | default: |
| 112 | return copy_user_generic((__force void *)dst, src, size); | 112 | return copy_user_generic((__force void *)dst, src, size); |
| @@ -157,7 +157,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) | |||
| 157 | ret, "q", "", "=r", 8); | 157 | ret, "q", "", "=r", 8); |
| 158 | if (likely(!ret)) | 158 | if (likely(!ret)) |
| 159 | __put_user_asm(tmp, (u64 __user *)dst, | 159 | __put_user_asm(tmp, (u64 __user *)dst, |
| 160 | ret, "q", "", "ir", 8); | 160 | ret, "q", "", "er", 8); |
| 161 | return ret; | 161 | return ret; |
| 162 | } | 162 | } |
| 163 | default: | 163 | default: |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 28e5f5956042..e2485b03f1cf 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
| @@ -356,7 +356,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | |||
| 356 | #endif | 356 | #endif |
| 357 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) | 357 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) |
| 358 | /* check CPU config space for extended APIC ID */ | 358 | /* check CPU config space for extended APIC ID */ |
| 359 | if (c->x86 >= 0xf) { | 359 | if (cpu_has_apic && c->x86 >= 0xf) { |
| 360 | unsigned int val; | 360 | unsigned int val; |
| 361 | val = read_pci_config(0, 24, 0, 0x68); | 361 | val = read_pci_config(0, 24, 0, 0x68); |
| 362 | if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) | 362 | if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) |
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 484c1e5f658e..1cfb623ce11c 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
| @@ -1692,17 +1692,15 @@ static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr, | |||
| 1692 | const char *buf, size_t siz) | 1692 | const char *buf, size_t siz) |
| 1693 | { | 1693 | { |
| 1694 | char *p; | 1694 | char *p; |
| 1695 | int len; | ||
| 1696 | 1695 | ||
| 1697 | strncpy(mce_helper, buf, sizeof(mce_helper)); | 1696 | strncpy(mce_helper, buf, sizeof(mce_helper)); |
| 1698 | mce_helper[sizeof(mce_helper)-1] = 0; | 1697 | mce_helper[sizeof(mce_helper)-1] = 0; |
| 1699 | len = strlen(mce_helper); | ||
| 1700 | p = strchr(mce_helper, '\n'); | 1698 | p = strchr(mce_helper, '\n'); |
| 1701 | 1699 | ||
| 1702 | if (*p) | 1700 | if (p) |
| 1703 | *p = 0; | 1701 | *p = 0; |
| 1704 | 1702 | ||
| 1705 | return len; | 1703 | return strlen(mce_helper) + !!p; |
| 1706 | } | 1704 | } |
| 1707 | 1705 | ||
| 1708 | static ssize_t set_ignore_ce(struct sys_device *s, | 1706 | static ssize_t set_ignore_ce(struct sys_device *s, |
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index 696f0e475c2d..92b7703d3d58 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
| @@ -187,7 +187,7 @@ static void __init apic_intr_init(void) | |||
| 187 | #ifdef CONFIG_X86_THERMAL_VECTOR | 187 | #ifdef CONFIG_X86_THERMAL_VECTOR |
| 188 | alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); | 188 | alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); |
| 189 | #endif | 189 | #endif |
| 190 | #ifdef CONFIG_X86_THRESHOLD | 190 | #ifdef CONFIG_X86_MCE_THRESHOLD |
| 191 | alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); | 191 | alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); |
| 192 | #endif | 192 | #endif |
| 193 | #if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC) | 193 | #if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC) |
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index 846510b78a09..2a62d843f015 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c | |||
| @@ -347,7 +347,7 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id) | |||
| 347 | 347 | ||
| 348 | static struct irqaction mfgptirq = { | 348 | static struct irqaction mfgptirq = { |
| 349 | .handler = mfgpt_tick, | 349 | .handler = mfgpt_tick, |
| 350 | .flags = IRQF_DISABLED | IRQF_NOBALANCING, | 350 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER, |
| 351 | .name = "mfgpt-timer" | 351 | .name = "mfgpt-timer" |
| 352 | }; | 352 | }; |
| 353 | 353 | ||
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index d2d1ce8170f0..508e982dd072 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -249,6 +249,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
| 249 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), | 249 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), |
| 250 | }, | 250 | }, |
| 251 | }, | 251 | }, |
| 252 | { /* Handle problems with rebooting on CompuLab SBC-FITPC2 */ | ||
| 253 | .callback = set_bios_reboot, | ||
| 254 | .ident = "CompuLab SBC-FITPC2", | ||
| 255 | .matches = { | ||
| 256 | DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"), | ||
| 257 | DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"), | ||
| 258 | }, | ||
| 259 | }, | ||
| 252 | { } | 260 | { } |
| 253 | }; | 261 | }; |
| 254 | 262 | ||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index de2cab132844..63f32d220ef2 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -672,6 +672,19 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = { | |||
| 672 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"), | 672 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"), |
| 673 | }, | 673 | }, |
| 674 | }, | 674 | }, |
| 675 | { | ||
| 676 | /* | ||
| 677 | * AMI BIOS with low memory corruption was found on Intel DG45ID board. | ||
| 678 | * It hase different DMI_BIOS_VENDOR = "Intel Corp.", for now we will | ||
| 679 | * match only DMI_BOARD_NAME and see if there is more bad products | ||
| 680 | * with this vendor. | ||
| 681 | */ | ||
| 682 | .callback = dmi_low_memory_corruption, | ||
| 683 | .ident = "AMI BIOS", | ||
| 684 | .matches = { | ||
| 685 | DMI_MATCH(DMI_BOARD_NAME, "DG45ID"), | ||
| 686 | }, | ||
| 687 | }, | ||
| 675 | #endif | 688 | #endif |
| 676 | {} | 689 | {} |
| 677 | }; | 690 | }; |
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 367e87882041..59f31d2dd435 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
| @@ -112,11 +112,6 @@ SECTIONS | |||
| 112 | _sdata = .; | 112 | _sdata = .; |
| 113 | DATA_DATA | 113 | DATA_DATA |
| 114 | CONSTRUCTORS | 114 | CONSTRUCTORS |
| 115 | |||
| 116 | #ifdef CONFIG_X86_64 | ||
| 117 | /* End of data section */ | ||
| 118 | _edata = .; | ||
| 119 | #endif | ||
| 120 | } :data | 115 | } :data |
| 121 | 116 | ||
| 122 | #ifdef CONFIG_X86_32 | 117 | #ifdef CONFIG_X86_32 |
| @@ -156,10 +151,8 @@ SECTIONS | |||
| 156 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { | 151 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { |
| 157 | *(.data.read_mostly) | 152 | *(.data.read_mostly) |
| 158 | 153 | ||
| 159 | #ifdef CONFIG_X86_32 | ||
| 160 | /* End of data section */ | 154 | /* End of data section */ |
| 161 | _edata = .; | 155 | _edata = .; |
| 162 | #endif | ||
| 163 | } | 156 | } |
| 164 | 157 | ||
| 165 | #ifdef CONFIG_X86_64 | 158 | #ifdef CONFIG_X86_64 |
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 2dfcbf9df2ae..dbb5381f7b3b 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
| @@ -79,8 +79,10 @@ static __init void bad_srat(void) | |||
| 79 | acpi_numa = -1; | 79 | acpi_numa = -1; |
| 80 | for (i = 0; i < MAX_LOCAL_APIC; i++) | 80 | for (i = 0; i < MAX_LOCAL_APIC; i++) |
| 81 | apicid_to_node[i] = NUMA_NO_NODE; | 81 | apicid_to_node[i] = NUMA_NO_NODE; |
| 82 | for (i = 0; i < MAX_NUMNODES; i++) | 82 | for (i = 0; i < MAX_NUMNODES; i++) { |
| 83 | nodes_add[i].start = nodes[i].end = 0; | 83 | nodes[i].start = nodes[i].end = 0; |
| 84 | nodes_add[i].start = nodes_add[i].end = 0; | ||
| 85 | } | ||
| 84 | remove_all_active_ranges(); | 86 | remove_all_active_ranges(); |
| 85 | } | 87 | } |
| 86 | 88 | ||
