x86: Fix bogus warning in apic_noop.apic_write()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 7 Dec 2009 11:59:46 +0000 (12:59 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:04:28 +0000 (14:04 -0800)
commit a946d8f11f0da9cfc714248036fcfd3a794d1e27 upstream.

apic_noop is used to provide dummy apic functions. It's installed
when the CPU has no APIC or when the APIC is disabled on the kernel
command line.

The apic_noop implementation of apic_write() warns when the CPU has
an APIC or when the APIC is not disabled.

That's bogus. The warning should only happen when the CPU has an
APIC _AND_ the APIC is not disabled. apic_noop.apic_read() has the
correct check.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <alpine.LFD.2.00.0912071255420.3089@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/apic/apic.c

index 894aa97f07178ed4972e39381fa375781ea4f158..c86dbcf39e8d65142974b10a56ff752cc782ef5f 100644 (file)
@@ -246,7 +246,7 @@ static int modern_apic(void)
  */
 static void native_apic_write_dummy(u32 reg, u32 v)
 {
-       WARN_ON_ONCE((cpu_has_apic || !disable_apic));
+       WARN_ON_ONCE(cpu_has_apic && !disable_apic);
 }
 
 static u32 native_apic_read_dummy(u32 reg)