aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
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)
220 220
221 /* unmask and set to NMI */ 221 /* unmask and set to NMI */
222 v = APIC_DM_NMI; 222 v = APIC_DM_NMI;
223
224 /* Level triggered for 82489DX (32bit mode) */
225 if (!lapic_is_integrated())
226 v |= APIC_LVT_LEVEL_TRIGGER;
227
223 apic_write(APIC_LVT0, v); 228 apic_write(APIC_LVT0, v);
224} 229}
225 230
@@ -228,11 +233,14 @@ void __cpuinit enable_NMI_through_LVT0(void)
228 */ 233 */
229int lapic_get_maxlvt(void) 234int lapic_get_maxlvt(void)
230{ 235{
231 unsigned int v, maxlvt; 236 unsigned int v;
232 237
233 v = apic_read(APIC_LVR); 238 v = apic_read(APIC_LVR);
234 maxlvt = GET_APIC_MAXLVT(v); 239 /*
235 return maxlvt; 240 * - we always have APIC integrated on 64bit mode
241 * - 82489DXs do not report # of LVT entries
242 */
243 return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
236} 244}
237 245
238/* 246/*