From: Thomas Gleixner Date: Mon, 7 Dec 2009 11:59:46 +0000 (+0100) Subject: x86: Fix bogus warning in apic_noop.apic_write() X-Git-Tag: firefly_0821_release~11625^2~565 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b3e1b060b2a4079723332d9d98a5891d670b9f8e;p=firefly-linux-kernel-4.4.55.git x86: Fix bogus warning in apic_noop.apic_write() 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 Cc: Cyrill Gorcunov LKML-Reference: Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 894aa97f0717..c86dbcf39e8d 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -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)