mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	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
This commit is contained in:
		
						commit
						ca597a02cd
					
				
					 10 changed files with 37 additions and 23 deletions
				
			
		|  | @ -212,9 +212,9 @@ extern int __get_user_bad(void); | ||||||
| 		     : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") | 		     : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") | ||||||
| #else | #else | ||||||
| #define __put_user_asm_u64(x, ptr, retval, errret) \ | #define __put_user_asm_u64(x, ptr, retval, errret) \ | ||||||
| 	__put_user_asm(x, ptr, retval, "q", "", "Zr", errret) | 	__put_user_asm(x, ptr, retval, "q", "", "er", errret) | ||||||
| #define __put_user_asm_ex_u64(x, addr)	\ | #define __put_user_asm_ex_u64(x, addr)	\ | ||||||
| 	__put_user_asm_ex(x, addr, "q", "", "Zr") | 	__put_user_asm_ex(x, addr, "q", "", "er") | ||||||
| #define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu) | #define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu) | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -88,11 +88,11 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size) | ||||||
| 			      ret, "l", "k", "ir", 4); | 			      ret, "l", "k", "ir", 4); | ||||||
| 		return ret; | 		return ret; | ||||||
| 	case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst, | 	case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst, | ||||||
| 			      ret, "q", "", "ir", 8); | 			      ret, "q", "", "er", 8); | ||||||
| 		return ret; | 		return ret; | ||||||
| 	case 10: | 	case 10: | ||||||
| 		__put_user_asm(*(u64 *)src, (u64 __user *)dst, | 		__put_user_asm(*(u64 *)src, (u64 __user *)dst, | ||||||
| 			       ret, "q", "", "ir", 10); | 			       ret, "q", "", "er", 10); | ||||||
| 		if (unlikely(ret)) | 		if (unlikely(ret)) | ||||||
| 			return ret; | 			return ret; | ||||||
| 		asm("":::"memory"); | 		asm("":::"memory"); | ||||||
|  | @ -101,12 +101,12 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size) | ||||||
| 		return ret; | 		return ret; | ||||||
| 	case 16: | 	case 16: | ||||||
| 		__put_user_asm(*(u64 *)src, (u64 __user *)dst, | 		__put_user_asm(*(u64 *)src, (u64 __user *)dst, | ||||||
| 			       ret, "q", "", "ir", 16); | 			       ret, "q", "", "er", 16); | ||||||
| 		if (unlikely(ret)) | 		if (unlikely(ret)) | ||||||
| 			return ret; | 			return ret; | ||||||
| 		asm("":::"memory"); | 		asm("":::"memory"); | ||||||
| 		__put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst, | 		__put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst, | ||||||
| 			       ret, "q", "", "ir", 8); | 			       ret, "q", "", "er", 8); | ||||||
| 		return ret; | 		return ret; | ||||||
| 	default: | 	default: | ||||||
| 		return copy_user_generic((__force void *)dst, src, size); | 		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) | ||||||
| 			       ret, "q", "", "=r", 8); | 			       ret, "q", "", "=r", 8); | ||||||
| 		if (likely(!ret)) | 		if (likely(!ret)) | ||||||
| 			__put_user_asm(tmp, (u64 __user *)dst, | 			__put_user_asm(tmp, (u64 __user *)dst, | ||||||
| 				       ret, "q", "", "ir", 8); | 				       ret, "q", "", "er", 8); | ||||||
| 		return ret; | 		return ret; | ||||||
| 	} | 	} | ||||||
| 	default: | 	default: | ||||||
|  |  | ||||||
|  | @ -356,7 +356,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | ||||||
| #endif | #endif | ||||||
| #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) | ||||||
| 	/* check CPU config space for extended APIC ID */ | 	/* check CPU config space for extended APIC ID */ | ||||||
| 	if (c->x86 >= 0xf) { | 	if (cpu_has_apic && c->x86 >= 0xf) { | ||||||
| 		unsigned int val; | 		unsigned int val; | ||||||
| 		val = read_pci_config(0, 24, 0, 0x68); | 		val = read_pci_config(0, 24, 0, 0x68); | ||||||
| 		if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) | 		if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) | ||||||
|  |  | ||||||
|  | @ -1692,17 +1692,15 @@ static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr, | ||||||
| 				const char *buf, size_t siz) | 				const char *buf, size_t siz) | ||||||
| { | { | ||||||
| 	char *p; | 	char *p; | ||||||
| 	int len; |  | ||||||
| 
 | 
 | ||||||
| 	strncpy(mce_helper, buf, sizeof(mce_helper)); | 	strncpy(mce_helper, buf, sizeof(mce_helper)); | ||||||
| 	mce_helper[sizeof(mce_helper)-1] = 0; | 	mce_helper[sizeof(mce_helper)-1] = 0; | ||||||
| 	len = strlen(mce_helper); |  | ||||||
| 	p = strchr(mce_helper, '\n'); | 	p = strchr(mce_helper, '\n'); | ||||||
| 
 | 
 | ||||||
| 	if (*p) | 	if (p) | ||||||
| 		*p = 0; | 		*p = 0; | ||||||
| 
 | 
 | ||||||
| 	return len; | 	return strlen(mce_helper) + !!p; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static ssize_t set_ignore_ce(struct sys_device *s, | static ssize_t set_ignore_ce(struct sys_device *s, | ||||||
|  |  | ||||||
|  | @ -187,7 +187,7 @@ static void __init apic_intr_init(void) | ||||||
| #ifdef CONFIG_X86_THERMAL_VECTOR | #ifdef CONFIG_X86_THERMAL_VECTOR | ||||||
| 	alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); | 	alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); | ||||||
| #endif | #endif | ||||||
| #ifdef CONFIG_X86_THRESHOLD | #ifdef CONFIG_X86_MCE_THRESHOLD | ||||||
| 	alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); | 	alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); | ||||||
| #endif | #endif | ||||||
| #if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC) | #if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC) | ||||||
|  |  | ||||||
|  | @ -347,7 +347,7 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id) | ||||||
| 
 | 
 | ||||||
| static struct irqaction mfgptirq  = { | static struct irqaction mfgptirq  = { | ||||||
| 	.handler = mfgpt_tick, | 	.handler = mfgpt_tick, | ||||||
| 	.flags = IRQF_DISABLED | IRQF_NOBALANCING, | 	.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER, | ||||||
| 	.name = "mfgpt-timer" | 	.name = "mfgpt-timer" | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -249,6 +249,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | ||||||
| 			DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), | 			DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), | ||||||
| 		}, | 		}, | ||||||
| 	}, | 	}, | ||||||
|  | 	{	/* Handle problems with rebooting on CompuLab SBC-FITPC2 */ | ||||||
|  | 		.callback = set_bios_reboot, | ||||||
|  | 		.ident = "CompuLab SBC-FITPC2", | ||||||
|  | 		.matches = { | ||||||
|  | 			DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"), | ||||||
|  | 			DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"), | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
| 	{ } | 	{ } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -672,6 +672,19 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = { | ||||||
| 			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"), | 			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"), | ||||||
| 		}, | 		}, | ||||||
| 	}, | 	}, | ||||||
|  | 	{ | ||||||
|  | 	/*
 | ||||||
|  | 	 * AMI BIOS with low memory corruption was found on Intel DG45ID board. | ||||||
|  | 	 * It hase different DMI_BIOS_VENDOR = "Intel Corp.", for now we will | ||||||
|  | 	 * match only DMI_BOARD_NAME and see if there is more bad products | ||||||
|  | 	 * with this vendor. | ||||||
|  | 	 */ | ||||||
|  | 		.callback = dmi_low_memory_corruption, | ||||||
|  | 		.ident = "AMI BIOS", | ||||||
|  | 		.matches = { | ||||||
|  | 			DMI_MATCH(DMI_BOARD_NAME, "DG45ID"), | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
| #endif | #endif | ||||||
| 	{} | 	{} | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -112,11 +112,6 @@ SECTIONS | ||||||
| 		_sdata = .;
 | 		_sdata = .;
 | ||||||
| 		DATA_DATA | 		DATA_DATA | ||||||
| 		CONSTRUCTORS | 		CONSTRUCTORS | ||||||
| 
 |  | ||||||
| #ifdef CONFIG_X86_64 |  | ||||||
| 		/* End of data section */ |  | ||||||
| 		_edata = .;
 |  | ||||||
| #endif |  | ||||||
| 	} :data | 	} :data | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_X86_32 | #ifdef CONFIG_X86_32 | ||||||
|  | @ -156,10 +151,8 @@ SECTIONS | ||||||
| 	.data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { | 	.data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { | ||||||
| 		*(.data.read_mostly) | 		*(.data.read_mostly) | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_X86_32 |  | ||||||
| 		/* End of data section */ | 		/* End of data section */ | ||||||
| 		_edata = .;
 | 		_edata = .;
 | ||||||
| #endif |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| #ifdef CONFIG_X86_64 | #ifdef CONFIG_X86_64 | ||||||
|  |  | ||||||
|  | @ -79,8 +79,10 @@ static __init void bad_srat(void) | ||||||
| 	acpi_numa = -1; | 	acpi_numa = -1; | ||||||
| 	for (i = 0; i < MAX_LOCAL_APIC; i++) | 	for (i = 0; i < MAX_LOCAL_APIC; i++) | ||||||
| 		apicid_to_node[i] = NUMA_NO_NODE; | 		apicid_to_node[i] = NUMA_NO_NODE; | ||||||
| 	for (i = 0; i < MAX_NUMNODES; i++) | 	for (i = 0; i < MAX_NUMNODES; i++) { | ||||||
| 		nodes_add[i].start = nodes[i].end = 0; | 		nodes[i].start = nodes[i].end = 0; | ||||||
|  | 		nodes_add[i].start = nodes_add[i].end = 0; | ||||||
|  | 	} | ||||||
| 	remove_all_active_ranges(); | 	remove_all_active_ranges(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Linus Torvalds
						Linus Torvalds