[PATCH 10/15] x86: apic - unify end_local_APIC_setup

From: Cyrill Gorcunov
Date: Mon Aug 18 2008 - 12:48:10 EST


Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---
arch/x86/kernel/apic_32.c | 6 ++++--
arch/x86/kernel/apic_64.c | 9 +++++++++
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index c3a252b..f188232 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -1155,13 +1155,15 @@ void __cpuinit setup_local_APIC(void)

void __cpuinit end_local_APIC_setup(void)
{
- unsigned long value;
-
lapic_setup_esr();
+
+#ifdef CONFIG_X86_32
+ unsigned int value;
/* Disable the local apic timer */
value = apic_read(APIC_LVTT);
value |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
apic_write(APIC_LVTT, value);
+#endif

setup_apic_nmi_watchdog(NULL);
apic_pm_activate();
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 76c2077..eec10b3 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -1014,6 +1014,15 @@ void __cpuinit setup_local_APIC(void)
void __cpuinit end_local_APIC_setup(void)
{
lapic_setup_esr();
+
+#ifdef CONFIG_X86_32
+ unsigned int value;
+ /* Disable the local apic timer */
+ value = apic_read(APIC_LVTT);
+ value |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
+ apic_write(APIC_LVTT, value);
+#endif
+
setup_apic_nmi_watchdog(NULL);
apic_pm_activate();
}
--
1.6.0.rc1.34.g0fe8c

--
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/