Patches contributed by Eötvös Lorand University


commit 33a37eb411d193851c334060780ab834ba534292
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Jul 21 10:57:15 2008 +0200

    KVM: fix exception entry / build bug, on 64-bit
    
    -tip testing found this build bug:
    
     arch/x86/kvm/built-in.o:(.text.fixup+0x1): relocation truncated to fit: R_X86_64_32 against `.text'
     arch/x86/kvm/built-in.o:(.text.fixup+0xb): relocation truncated to fit: R_X86_64_32 against `.text'
     arch/x86/kvm/built-in.o:(.text.fixup+0x15): relocation truncated to fit: R_X86_64_32 against `.text'
     arch/x86/kvm/built-in.o:(.text.fixup+0x1f): relocation truncated to fit: R_X86_64_32 against `.text'
     arch/x86/kvm/built-in.o:(.text.fixup+0x29): relocation truncated to fit: R_X86_64_32 against `.text'
    
    Introduced by commit 4ecac3fd. The problem is that 'push' will default
    to 32-bit, which is not wide enough as a fixup address. (and which would
    crash on any real fixup event even if it was wide enough)
    
    Introduce KVM_EX_PUSH to get the proper address push width on 64-bit too.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index f995783b1fdb..fdde0bedaa90 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -703,9 +703,11 @@ enum {
 						vcpu, 0, 0, 0, 0, 0, 0)
 
 #ifdef CONFIG_64BIT
-#define KVM_EX_ENTRY ".quad"
+# define KVM_EX_ENTRY ".quad"
+# define KVM_EX_PUSH "pushq"
 #else
-#define KVM_EX_ENTRY ".long"
+# define KVM_EX_ENTRY ".long"
+# define KVM_EX_PUSH "pushl"
 #endif
 
 /*
@@ -719,7 +721,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void);
 	"666: " insn "\n\t" \
 	".pushsection .text.fixup, \"ax\" \n" \
 	"667: \n\t" \
-	"push $666b \n\t" \
+	KVM_EX_PUSH " $666b \n\t" \
 	"jmp kvm_handle_fault_on_reboot \n\t" \
 	".popsection \n\t" \
 	".pushsection __ex_table, \"a\" \n\t" \

commit e27772b48df91a954a74b1411b57d83b945a58c7
Merge: d092633bff3b 14b395e35d1a
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Jul 21 11:02:45 2008 +0200

    Merge branch 'linus' into x86/urgent

commit 7be42004065ce4df193aeef5befd26805267d0d9
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Jul 20 17:04:57 2008 +0200

    x86, lguest: fix apic_ops build on UP
    
    fix:
    
      arch/x86/lguest/boot.c:816: error: variable ‘lguest_basic_apic_ops’ has initializer but incomplete type
      arch/x86/lguest/boot.c:817: error: unknown field ‘read’ specified in initializer
     [...]
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 35c4349cd668..756fc489652b 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -55,6 +55,7 @@
 #include <linux/lguest_launcher.h>
 #include <linux/virtio_console.h>
 #include <linux/pm.h>
+#include <asm/apic.h>
 #include <asm/lguest.h>
 #include <asm/paravirt.h>
 #include <asm/param.h>

commit caf43bf7c6a55e89b6df5179df434d67e24aa32e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Jul 20 14:06:50 2008 +0200

    x86, xen: fix apic_ops build on UP
    
    fix:
    
     arch/x86/xen/enlighten.c:615: error: variable ‘xen_basic_apic_ops’ has initializer but incomplete type
     arch/x86/xen/enlighten.c:616: error: unknown field ‘read’ specified in initializer
     [...]
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 008b7b69581e..e4d1459a63df 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -35,6 +35,7 @@
 #include <xen/page.h>
 
 #include <asm/paravirt.h>
+#include <asm/apic.h>
 #include <asm/page.h>
 #include <asm/xen/hypercall.h>
 #include <asm/xen/hypervisor.h>

commit ba42059fbd0aa1ac91b582412b5fedb1258f241f
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Jul 20 11:02:06 2008 +0200

    sched: hrtick_enabled() should use cpu_active()
    
    Peter pointed out that hrtick_enabled() should use cpu_active().
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/sched.c b/kernel/sched.c
index 85cf246cfdf5..62b1b8ecb5c7 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1006,7 +1006,7 @@ static inline int hrtick_enabled(struct rq *rq)
 {
 	if (!sched_feat(HRTICK))
 		return 0;
-	if (!cpu_online(cpu_of(rq)))
+	if (!cpu_active(cpu_of(rq)))
 		return 0;
 	return hrtimer_is_hres_active(&rq->hrtick_timer);
 }

commit d986434a7d32079cc6cbedcdb04d834aa9b323ff
Merge: 1b427c153a08 31656519e132
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Jul 20 11:01:29 2008 +0200

    Merge branch 'sched/urgent' into sched/devel

commit c4dc59ae7af8c1c116d2cb4dffba337f032a6bee
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Jul 20 09:31:24 2008 +0200

    x86, VisWS: turn into generic arch, eliminate leftover files
    
    remove unused leftovers.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/asm-x86/mach-visws/entry_arch.h b/include/asm-x86/mach-visws/entry_arch.h
deleted file mode 100644
index 86be554342d4..000000000000
--- a/include/asm-x86/mach-visws/entry_arch.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * VISWS uses the standard Linux entry points:
- */
-
-#include "../mach-default/entry_arch.h"
diff --git a/include/asm-x86/mach-visws/mach_apic.h b/include/asm-x86/mach-visws/mach_apic.h
deleted file mode 100644
index 6943e7a1d0e6..000000000000
--- a/include/asm-x86/mach-visws/mach_apic.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../mach-default/mach_apic.h"
diff --git a/include/asm-x86/mach-visws/mach_apicdef.h b/include/asm-x86/mach-visws/mach_apicdef.h
deleted file mode 100644
index 42711d152a93..000000000000
--- a/include/asm-x86/mach-visws/mach_apicdef.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../mach-default/mach_apicdef.h"
diff --git a/include/asm-x86/mach-visws/setup_arch.h b/include/asm-x86/mach-visws/setup_arch.h
deleted file mode 100644
index fa4766ca2d10..000000000000
--- a/include/asm-x86/mach-visws/setup_arch.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../mach-default/setup_arch.h"
diff --git a/include/asm-x86/mach-visws/smpboot_hooks.h b/include/asm-x86/mach-visws/smpboot_hooks.h
deleted file mode 100644
index e4433ca88715..000000000000
--- a/include/asm-x86/mach-visws/smpboot_hooks.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../mach-default/smpboot_hooks.h"

commit d092633bff3b19faffc480fe9810805e7792a029
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Jul 18 00:26:59 2008 +0200

    Subject: devmem, x86: fix rename of CONFIG_NONPROMISC_DEVMEM
    From: Arjan van de Ven <arjan@infradead.org>
    Date: Sat, 19 Jul 2008 15:47:17 -0700
    
    CONFIG_NONPROMISC_DEVMEM was a rather confusing name - but renaming it
    to CONFIG_PROMISC_DEVMEM causes problems on architectures that do not
    support this feature; this patch renames it to CONFIG_STRICT_DEVMEM,
    so that architectures can opt-in into it.
    
    ( the polarity of the option is still the same as it was originally; it
      needs to be for now to not break architectures that don't have the
      infastructure yet to support this feature)
    
    Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
    Cc: "V.Radhakrishnan" <rk@atr-labs.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    ---

diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index f0cf5d990794..51c821477951 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -5,14 +5,15 @@ config TRACE_IRQFLAGS_SUPPORT
 
 source "lib/Kconfig.debug"
 
-config PROMISC_DEVMEM
-	bool "Allow unlimited access to /dev/mem"
-	default y
+config STRICT_DEVMEM
+	bool "Filter access to /dev/mem"
 	help
 	  If this option is left on, you allow userspace (root) access to all
 	  of memory, including kernel and userspace memory. Accidental
 	  access to this is obviously disastrous, but specific access can
-	  be used by people debugging the kernel.
+	  be used by people debugging the kernel. Note that with PAT support
+	  enabled, even in this case there are restrictions on /dev/mem
+	  use due to the cache aliasing requirements.
 
 	  If this option is switched on, the /dev/mem file only allows
 	  userspace access to PCI space and the BIOS code and data regions.
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 9bc34e2033ec..4d73f53287b6 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -2047,7 +2047,7 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 # CONFIG_SAMPLES is not set
 # CONFIG_KGDB is not set
 CONFIG_HAVE_ARCH_KGDB=y
-# CONFIG_NONPROMISC_DEVMEM is not set
+# CONFIG_STRICT_DEVMEM is not set
 CONFIG_EARLY_PRINTK=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index ae5124e064d4..a40452429625 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -2012,7 +2012,7 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 # CONFIG_SAMPLES is not set
 # CONFIG_KGDB is not set
 CONFIG_HAVE_ARCH_KGDB=y
-# CONFIG_NONPROMISC_DEVMEM is not set
+# CONFIG_STRICT_DEVMEM is not set
 CONFIG_EARLY_PRINTK=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index c34dc483839c..6bb597f4d701 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -373,8 +373,8 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
 	return vma_prot;
 }
 
-#ifndef CONFIG_PROMISC_DEVMEM
-/* This check is done in drivers/char/mem.c in case of !PROMISC_DEVMEM*/
+#ifdef CONFIG_STRICT_DEVMEM
+/* This check is done in drivers/char/mem.c in case of STRICT_DEVMEM*/
 static inline int range_is_allowed(unsigned long pfn, unsigned long size)
 {
 	return 1;
@@ -398,7 +398,7 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
 	}
 	return 1;
 }
-#endif /* CONFIG_PROMISC_DEVMEM */
+#endif /* CONFIG_STRICT_DEVMEM */
 
 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
 				unsigned long size, pgprot_t *vma_prot)
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index de05775bd687..b6772d657547 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -80,7 +80,7 @@ static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)
 }
 #endif
 
-#ifndef CONFIG_PROMISC_DEVMEM
+#ifdef CONFIG_STRICT_DEVMEM
 static inline int range_is_allowed(unsigned long pfn, unsigned long size)
 {
 	u64 from = ((u64)pfn) << PAGE_SHIFT;

commit 9553e11325e3d44a8c8a1428c7e5f146f1cc7238
Merge: 453c1404c527 7019cc2dd6fa
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Jul 18 23:01:04 2008 +0200

    Merge branch 'x86/uv' into x86/x2apic
    
    Conflicts:
    
            arch/x86/kernel/Makefile
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --cc arch/x86/kernel/Makefile
index 673f1d12b420,b78a17b12810..ea000467553f
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@@ -102,8 -102,7 +102,9 @@@ obj-$(CONFIG_OLPC)		+= olpc.
  # 64 bit specific files
  ifeq ($(CONFIG_X86_64),y)
          obj-y				+= genapic_64.o genapic_flat_64.o genx2apic_uv_x.o tlb_uv.o
+ 	obj-y				+= bios_uv.o
 +        obj-y				+= genx2apic_cluster.o
 +        obj-y				+= genx2apic_phys.o
          obj-$(CONFIG_X86_PM_TIMER)	+= pmtimer_64.o
          obj-$(CONFIG_AUDIT)		+= audit_64.o
  

commit 453c1404c5273a30d715e5a83372a78cff70b6d9
Merge: a208f37a465e 35b680557f95
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Jul 18 23:00:05 2008 +0200

    Merge branch 'x86/apic' into x86/x2apic
    
    Conflicts:
    
            arch/x86/kernel/paravirt.c
            arch/x86/kernel/smpboot.c
            arch/x86/kernel/vmi_32.c
            arch/x86/lguest/boot.c
            arch/x86/xen/enlighten.c
            include/asm-x86/apic.h
            include/asm-x86/paravirt.h
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --cc arch/x86/kernel/io_apic_64.c
index 39f0be37e9a1,64a46affd858..116aac365981
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@@ -2049,18 -1735,15 +2051,17 @@@ static inline void __init check_timer(v
  				clear_IO_APIC_pin(0, pin1);
  			goto out;
  		}
 +		if (intr_remapping_enabled)
 +			panic("timer doesn't work through Interrupt-remapped IO-APIC");
  		clear_IO_APIC_pin(apic1, pin1);
  		if (!no_pin1)
- 			apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: "
+ 			apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: "
  				    "8254 timer not connected to IO-APIC\n");
  
- 		apic_printk(APIC_VERBOSE,KERN_INFO
- 			"...trying to set up timer (IRQ0) "
- 			"through the 8259A ... ");
- 		apic_printk(APIC_VERBOSE,"\n..... (found apic %d pin %d) ...",
- 			apic2, pin2);
+ 		apic_printk(APIC_QUIET, KERN_INFO "...trying to set up timer "
+ 			    "(IRQ0) through the 8259A ...\n");
+ 		apic_printk(APIC_QUIET, KERN_INFO
+ 			    "..... (found apic %d pin %d) ...\n", apic2, pin2);
  		/*
  		 * legacy devices should be connected to IO APIC #0
  		 */
diff --cc arch/x86/kernel/vmi_32.c
index 237082833c14,0a1b1a9d922d..45c27c4e2a6e
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@@ -904,9 -904,8 +904,8 @@@ static inline int __init activate_vmi(v
  #endif
  
  #ifdef CONFIG_X86_LOCAL_APIC
 -	para_fill(pv_apic_ops.apic_read, APICRead);
 -	para_fill(pv_apic_ops.apic_write, APICWrite);
 +       para_fill(apic_ops->read, APICRead);
 +       para_fill(apic_ops->write, APICWrite);
-        para_fill(apic_ops->write_atomic, APICWrite);
  #endif
  
  	/*
diff --cc arch/x86/lguest/boot.c
index 675ee7a6475e,0313a5eec412..35c4349cd668
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@@ -791,37 -791,6 +791,36 @@@ static u32 lguest_apic_read(u32 reg
  {
  	return 0;
  }
 +
 +static u64 lguest_apic_icr_read(void)
 +{
 +	return 0;
 +}
 +
 +static void lguest_apic_icr_write(u32 low, u32 id)
 +{
 +	/* Warn to see if there's any stray references */
 +	WARN_ON(1);
 +}
 +
 +static void lguest_apic_wait_icr_idle(void)
 +{
 +	return;
 +}
 +
 +static u32 lguest_apic_safe_wait_icr_idle(void)
 +{
 +	return 0;
 +}
 +
 +static struct apic_ops lguest_basic_apic_ops = {
 +	.read = lguest_apic_read,
 +	.write = lguest_apic_write,
- 	.write_atomic = lguest_apic_write,
 +	.icr_read = lguest_apic_icr_read,
 +	.icr_write = lguest_apic_icr_write,
 +	.wait_icr_idle = lguest_apic_wait_icr_idle,
 +	.safe_wait_icr_idle = lguest_apic_safe_wait_icr_idle,
 +};
  #endif
  
  /* STOP!  Until an interrupt comes in. */
diff --cc arch/x86/xen/enlighten.c
index 402f3e2c7bee,7f26c3718777..008b7b69581e
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@@ -558,38 -558,6 +558,37 @@@ static void xen_apic_write(u32 reg, u3
  	/* Warn to see if there's any stray references */
  	WARN_ON(1);
  }
 +
 +static u64 xen_apic_icr_read(void)
 +{
 +	return 0;
 +}
 +
 +static void xen_apic_icr_write(u32 low, u32 id)
 +{
 +	/* Warn to see if there's any stray references */
 +	WARN_ON(1);
 +}
 +
 +static void xen_apic_wait_icr_idle(void)
 +{
 +        return;
 +}
 +
 +static u32 xen_safe_apic_wait_icr_idle(void)
 +{
 +        return 0;
 +}
 +
 +static struct apic_ops xen_basic_apic_ops = {
 +	.read = xen_apic_read,
 +	.write = xen_apic_write,
- 	.write_atomic = xen_apic_write,
 +	.icr_read = xen_apic_icr_read,
 +	.icr_write = xen_apic_icr_write,
 +	.wait_icr_idle = xen_apic_wait_icr_idle,
 +	.safe_wait_icr_idle = xen_safe_apic_wait_icr_idle,
 +};
 +
  #endif
  
  static void xen_flush_tlb(void)
diff --cc include/asm-x86/apic.h
index fcd2f01277b6,b96460a7190d..300b65e57240
--- a/include/asm-x86/apic.h
+++ b/include/asm-x86/apic.h
@@@ -55,90 -57,24 +57,77 @@@ extern int disable_apic
  
  extern int is_vsmp_box(void);
  
 -static inline void native_apic_write(unsigned long reg, u32 v)
 +static inline void native_apic_mem_write(u32 reg, u32 v)
  {
- 	*((volatile u32 *)(APIC_BASE + reg)) = v;
- }
+ 	volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
  
- static inline void native_apic_mem_write_atomic(u32 reg, u32 v)
- {
- 	(void)xchg((u32 *)(APIC_BASE + reg), v);
+ 	alternative_io("movl %0, %1", "xchgl %0, %1", X86_FEATURE_11AP,
+ 		       ASM_OUTPUT2("=r" (v), "=m" (*addr)),
+ 		       ASM_OUTPUT2("0" (v), "m" (*addr)));
  }
  
 -static inline u32 native_apic_read(unsigned long reg)
 +static inline u32 native_apic_mem_read(u32 reg)
  {
  	return *((volatile u32 *)(APIC_BASE + reg));
  }
  
 -extern void apic_wait_icr_idle(void);
 -extern u32 safe_apic_wait_icr_idle(void);
 +static inline void native_apic_msr_write(u32 reg, u32 v)
 +{
 +	if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
 +	    reg == APIC_LVR)
 +		return;
 +
 +	wrmsr(APIC_BASE_MSR + (reg >> 4), v, 0);
 +}
 +
 +static inline u32 native_apic_msr_read(u32 reg)
 +{
 +	u32 low, high;
 +
 +	if (reg == APIC_DFR)
 +		return -1;
 +
 +	rdmsr(APIC_BASE_MSR + (reg >> 4), low, high);
 +	return low;
 +}
 +
 +#ifndef CONFIG_X86_32
 +extern int x2apic, x2apic_preenabled;
 +extern void check_x2apic(void);
 +extern void enable_x2apic(void);
 +extern void enable_IR_x2apic(void);
 +extern void x2apic_icr_write(u32 low, u32 id);
 +#endif
 +
 +struct apic_ops {
 +	u32 (*read)(u32 reg);
 +	void (*write)(u32 reg, u32 v);
- 	void (*write_atomic)(u32 reg, u32 v);
 +	u64 (*icr_read)(void);
 +	void (*icr_write)(u32 low, u32 high);
 +	void (*wait_icr_idle)(void);
 +	u32 (*safe_wait_icr_idle)(void);
 +};
 +
 +extern struct apic_ops *apic_ops;
 +
 +#define apic_read (apic_ops->read)
 +#define apic_write (apic_ops->write)
- #define apic_write_atomic (apic_ops->write_atomic)
 +#define apic_icr_read (apic_ops->icr_read)
 +#define apic_icr_write (apic_ops->icr_write)
 +#define apic_wait_icr_idle (apic_ops->wait_icr_idle)
 +#define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle)
 +
  extern int get_physical_broadcast(void);
  
- #ifdef CONFIG_X86_GOOD_APIC
- # define FORCE_READ_AROUND_WRITE 0
- # define apic_read_around(x)
- # define apic_write_around(x, y) apic_write((x), (y))
- #else
- # define FORCE_READ_AROUND_WRITE 1
- # define apic_read_around(x) apic_read(x)
- # define apic_write_around(x, y) apic_write_atomic((x), (y))
- #endif
- 
 +#ifdef CONFIG_X86_64
 +static inline void ack_x2APIC_irq(void)
 +{
 +	/* Docs say use 0 for future compatibility */
 +	native_apic_msr_write(APIC_EOI, 0);
 +}
 +#endif
 +
 +
  static inline void ack_APIC_irq(void)
  {
  	/*
@@@ -149,11 -85,7 +138,11 @@@
  	 */
  
  	/* Docs say use 0 for future compatibility */
 +#ifdef CONFIG_X86_32
- 	apic_write_around(APIC_EOI, 0);
+ 	apic_write(APIC_EOI, 0);
 +#else
 +	native_apic_mem_write(APIC_EOI, 0);
 +#endif
  }
  
  extern int lapic_get_maxlvt(void);