summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-14 15:13:47 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-14 15:13:47 +0200
commit881b374705f352725ba1f558968ef34c17ba900e (patch)
treed7286c00d109db65662af1435fe3b5c8868814d2 /arch/x86/kernel/apic_64.c
parentc83d12806b6185131ece682de8696d8cfb78df69 (diff)
parentd4c63ec060f3315653c0ae5bc3a7fe2419a2282f (diff)
Merge branch 'x86/apic' into x86/core
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index cd63c0bc6180..69a876be506f 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -220,6 +220,11 @@ void __cpuinit enable_NMI_through_LVT0(void)
/* unmask and set to NMI */
v = APIC_DM_NMI;
+
+ /* Level triggered for 82489DX (32bit mode) */
+ if (!lapic_is_integrated())
+ v |= APIC_LVT_LEVEL_TRIGGER;
+
apic_write(APIC_LVT0, v);
}
@@ -228,11 +233,14 @@ void __cpuinit enable_NMI_through_LVT0(void)
*/
int lapic_get_maxlvt(void)
{
- unsigned int v, maxlvt;
+ unsigned int v;
v = apic_read(APIC_LVR);
- maxlvt = GET_APIC_MAXLVT(v);
- return maxlvt;
+ /*
+ * - we always have APIC integrated on 64bit mode
+ * - 82489DXs do not report # of LVT entries
+ */
+ return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
}
/*