public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Fix bogus warning in apic_noop.apic_write()
@ 2009-12-07 11:59 Thomas Gleixner
  2009-12-07 12:18 ` [tip:x86/urgent] " tip-bot for Thomas Gleixner
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Gleixner @ 2009-12-07 11:59 UTC (permalink / raw)
  To: LKML; +Cc: x86, Cyrill Gorcunov

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.

[ @stable: in <= .32 this typo resides in native_apic_write_dummy(). ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
---
 arch/x86/kernel/apic/apic_noop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/x86/kernel/apic/apic_noop.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/apic_noop.c
+++ linux-2.6/arch/x86/kernel/apic/apic_noop.c
@@ -127,7 +127,7 @@ static u32 noop_apic_read(u32 reg)
 
 static void noop_apic_write(u32 reg, u32 v)
 {
-	WARN_ON_ONCE((cpu_has_apic || !disable_apic));
+	WARN_ON_ONCE((cpu_has_apic && !disable_apic));
 }
 
 struct apic apic_noop = {

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-07 18:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 11:59 [PATCH] x86: Fix bogus warning in apic_noop.apic_write() Thomas Gleixner
2009-12-07 12:18 ` [tip:x86/urgent] " tip-bot for Thomas Gleixner
2009-12-07 15:04   ` Cyrill Gorcunov
2009-12-07 15:48     ` Thomas Gleixner
2009-12-07 16:30       ` Cyrill Gorcunov
2009-12-07 16:55         ` Thomas Gleixner
2009-12-07 18:04           ` Cyrill Gorcunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox