[patch 06/11] x86: nmi_32/64.c - use apic_write_around instead of apic_write

From: Cyrill Gorcunov
Date: Sat May 24 2008 - 11:43:37 EST


apic_write_around will be expanded to apic_write in 64bit mode
anyway. Only a few CPUs (well, old CPUs to be precise) requires
such an action. In general it should not hurt and could be cleaned
up for apic_write (just in case)

Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---

Index: linux-2.6.git/arch/x86/kernel/nmi_32.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/nmi_32.c 2008-05-24 13:04:20.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/nmi_32.c 2008-05-24 13:07:08.000000000 +0400
@@ -248,7 +248,7 @@ void acpi_nmi_enable(void)

static void __acpi_nmi_disable(void *__unused)
{
- apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
+ apic_write_around(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
}

/*
Index: linux-2.6.git/arch/x86/kernel/nmi_64.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/nmi_64.c 2008-05-24 13:02:04.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/nmi_64.c 2008-05-24 13:07:44.000000000 +0400
@@ -215,7 +215,7 @@ late_initcall(init_lapic_nmi_sysfs);

static void __acpi_nmi_enable(void *__unused)
{
- apic_write(APIC_LVT0, APIC_DM_NMI);
+ apic_write_around(APIC_LVT0, APIC_DM_NMI);
}

/*
@@ -229,7 +229,7 @@ void acpi_nmi_enable(void)

static void __acpi_nmi_disable(void *__unused)
{
- apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
+ apic_write_around(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
}

/*

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/