From e686d34156ef0e56b2ebec505b809018bc0dc73b Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sat, 26 Apr 2008 21:00:17 -0700 Subject: x86: !x & y typo in mtrr code As written, this can never be true. Spotted by the Sparse checker. Signed-off-by: Harvey Harrison Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/mtrr/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 353efe4f501..5d241ce94a4 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c @@ -90,7 +90,7 @@ u8 mtrr_type_lookup(u64 start, u64 end) * Look of multiple ranges matching this address and pick type * as per MTRR precedence */ - if (!mtrr_state.enabled & 2) { + if (!(mtrr_state.enabled & 2)) { return mtrr_state.def_type; } -- cgit v1.2.3 From 8008abbd87644c84f93a7a86fec88f1e14031901 Mon Sep 17 00:00:00 2001 From: Alexander van Heukelum Date: Wed, 16 Apr 2008 18:45:35 +0200 Subject: x86: fix warning in "x86: clean up vSMP detection" The function detect_vsmp_box is a void function in the PCI case. Change the !PCI stub to void too. Signed-off-by: Alexander van Heukelum Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- arch/x86/kernel/vsmp_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c index caf2a26f5cf..ba8c0b75ab0 100644 --- a/arch/x86/kernel/vsmp_64.c +++ b/arch/x86/kernel/vsmp_64.c @@ -133,7 +133,7 @@ int is_vsmp_box(void) } } #else -static int __init detect_vsmp_box(void) +static void __init detect_vsmp_box(void) { } int is_vsmp_box(void) -- cgit v1.2.3 From 781fe2ebc0f44b32418d203ac023a541afdd042f Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sat, 26 Apr 2008 23:14:36 +0200 Subject: bootprotocol: cleanup Signed-off-by: Ingo Molnar --- arch/x86/kernel/e820_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c index 645ee5e32a2..124480c0008 100644 --- a/arch/x86/kernel/e820_64.c +++ b/arch/x86/kernel/e820_64.c @@ -100,7 +100,7 @@ void __init free_early(unsigned long start, unsigned long end) for (j = i + 1; j < MAX_EARLY_RES && early_res[j].end; j++) ; - memcpy(&early_res[i], &early_res[i + 1], + memmove(&early_res[i], &early_res[i + 1], (j - 1 - i) * sizeof(struct early_res)); early_res[j - 1].end = 0; -- cgit v1.2.3 From e90955c26d8af318658c45caadb1d330ac6a506c Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Mon, 21 Apr 2008 14:14:44 -0700 Subject: x86: fix PCI MSI breaks when booting with nosmp set up sane APIC state even in the nosmp case. Signed-off-by: Ingo Molnar --- arch/x86/kernel/smpboot.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'arch') diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 04c662ba18f..84241a256dc 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1149,14 +1149,10 @@ static int __init smp_sanity_check(unsigned max_cpus) "forcing use of dummy APIC emulation.\n"); smpboot_clear_io_apic(); #ifdef CONFIG_X86_32 - if (nmi_watchdog == NMI_LOCAL_APIC) { - printk(KERN_INFO "activating minimal APIC for" - "NMI watchdog use.\n"); - connect_bsp_APIC(); - setup_local_APIC(); - end_local_APIC_setup(); - } + connect_bsp_APIC(); #endif + setup_local_APIC(); + end_local_APIC_setup(); return -1; } -- cgit v1.2.3