[lkml]   [2009]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] x86: Fix bogus warning in apic_noop.apic_write()
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

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

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

Signed-off-by: Thomas Gleixner <>
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 = {

 \ /
  Last update: 2009-12-07 13:03    [W:0.039 / U:2.324 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site