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: geode: Mark mfgpt irq IRQF_TIMER to prevent resume failure
x86, amd: Don't probe for extended APIC ID if APICs are disabled
x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"
x86-64: Fix bad_srat() to clear all state
x86, mce: Fix set_trigger() accessor
x86: Fix movq immediate operand constraints in uaccess.h
x86: Fix movq immediate operand constraints in uaccess_64.h
x86: Add reboot fixup for SBC-fitPC2
x86: Include all of .data.* sections in _edata on 64-bit
x86: Add quirk for Intel DG45ID board to avoid low memory corruption

+37 -23
+2 -2
arch/x86/include/asm/uaccess.h
··· 212 212 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") 213 213 #else 214 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 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 218 #define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu) 219 219 #endif 220 220
+5 -5
arch/x86/include/asm/uaccess_64.h
··· 88 88 ret, "l", "k", "ir", 4); 89 89 return ret; 90 90 case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst, 91 - ret, "q", "", "ir", 8); 91 + ret, "q", "", "er", 8); 92 92 return ret; 93 93 case 10: 94 94 __put_user_asm(*(u64 *)src, (u64 __user *)dst, 95 - ret, "q", "", "ir", 10); 95 + ret, "q", "", "er", 10); 96 96 if (unlikely(ret)) 97 97 return ret; 98 98 asm("":::"memory"); ··· 101 101 return ret; 102 102 case 16: 103 103 __put_user_asm(*(u64 *)src, (u64 __user *)dst, 104 - ret, "q", "", "ir", 16); 104 + ret, "q", "", "er", 16); 105 105 if (unlikely(ret)) 106 106 return ret; 107 107 asm("":::"memory"); 108 108 __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst, 109 - ret, "q", "", "ir", 8); 109 + ret, "q", "", "er", 8); 110 110 return ret; 111 111 default: 112 112 return copy_user_generic((__force void *)dst, src, size); ··· 157 157 ret, "q", "", "=r", 8); 158 158 if (likely(!ret)) 159 159 __put_user_asm(tmp, (u64 __user *)dst, 160 - ret, "q", "", "ir", 8); 160 + ret, "q", "", "er", 8); 161 161 return ret; 162 162 } 163 163 default:
+1 -1
arch/x86/kernel/cpu/amd.c
··· 356 356 #endif 357 357 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) 358 358 /* check CPU config space for extended APIC ID */ 359 - if (c->x86 >= 0xf) { 359 + if (cpu_has_apic && c->x86 >= 0xf) { 360 360 unsigned int val; 361 361 val = read_pci_config(0, 24, 0, 0x68); 362 362 if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18)))
+2 -4
arch/x86/kernel/cpu/mcheck/mce.c
··· 1692 1692 const char *buf, size_t siz) 1693 1693 { 1694 1694 char *p; 1695 - int len; 1696 1695 1697 1696 strncpy(mce_helper, buf, sizeof(mce_helper)); 1698 1697 mce_helper[sizeof(mce_helper)-1] = 0; 1699 - len = strlen(mce_helper); 1700 1698 p = strchr(mce_helper, '\n'); 1701 1699 1702 - if (*p) 1700 + if (p) 1703 1701 *p = 0; 1704 1702 1705 - return len; 1703 + return strlen(mce_helper) + !!p; 1706 1704 } 1707 1705 1708 1706 static ssize_t set_ignore_ce(struct sys_device *s,
+1 -1
arch/x86/kernel/irqinit.c
··· 187 187 #ifdef CONFIG_X86_THERMAL_VECTOR 188 188 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); 189 189 #endif 190 - #ifdef CONFIG_X86_THRESHOLD 190 + #ifdef CONFIG_X86_MCE_THRESHOLD 191 191 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); 192 192 #endif 193 193 #if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC)
+1 -1
arch/x86/kernel/mfgpt_32.c
··· 347 347 348 348 static struct irqaction mfgptirq = { 349 349 .handler = mfgpt_tick, 350 - .flags = IRQF_DISABLED | IRQF_NOBALANCING, 350 + .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER, 351 351 .name = "mfgpt-timer" 352 352 }; 353 353
+8
arch/x86/kernel/reboot.c
··· 249 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
+13
arch/x86/kernel/setup.c
··· 672 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 688 #endif 676 689 {} 677 690 };
-7
arch/x86/kernel/vmlinux.lds.S
··· 112 112 _sdata = .; 113 113 DATA_DATA 114 114 CONSTRUCTORS 115 - 116 - #ifdef CONFIG_X86_64 117 - /* End of data section */ 118 - _edata = .; 119 - #endif 120 115 } :data 121 116 122 117 #ifdef CONFIG_X86_32 ··· 151 156 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { 152 157 *(.data.read_mostly) 153 158 154 - #ifdef CONFIG_X86_32 155 159 /* End of data section */ 156 160 _edata = .; 157 - #endif 158 161 } 159 162 160 163 #ifdef CONFIG_X86_64
+4 -2
arch/x86/mm/srat_64.c
··· 79 79 acpi_numa = -1; 80 80 for (i = 0; i < MAX_LOCAL_APIC; i++) 81 81 apicid_to_node[i] = NUMA_NO_NODE; 82 - for (i = 0; i < MAX_NUMNODES; i++) 83 - nodes_add[i].start = nodes[i].end = 0; 82 + for (i = 0; i < MAX_NUMNODES; i++) { 83 + nodes[i].start = nodes[i].end = 0; 84 + nodes_add[i].start = nodes_add[i].end = 0; 85 + } 84 86 remove_all_active_ranges(); 85 87 } 86 88