aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-14 09:13:47 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-14 09:13:47 -0400
commit881b374705f352725ba1f558968ef34c17ba900e (patch)
treed7286c00d109db65662af1435fe3b5c8868814d2 /arch/x86/kernel/apic_32.c
parentc83d12806b6185131ece682de8696d8cfb78df69 (diff)
parentd4c63ec060f3315653c0ae5bc3a7fe2419a2282f (diff)
Merge branch 'x86/apic' into x86/core
Diffstat (limited to 'arch/x86/kernel/apic_32.c')
-rw-r--r--arch/x86/kernel/apic_32.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 84318edad8fb..12b154822bce 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -205,11 +205,15 @@ EXPORT_SYMBOL_GPL(apic_ops);
205 */ 205 */
206void __cpuinit enable_NMI_through_LVT0(void) 206void __cpuinit enable_NMI_through_LVT0(void)
207{ 207{
208 unsigned int v = APIC_DM_NMI; 208 unsigned int v;
209
210 /* unmask and set to NMI */
211 v = APIC_DM_NMI;
209 212
210 /* Level triggered for 82489DX */ 213 /* Level triggered for 82489DX (32bit mode) */
211 if (!lapic_is_integrated()) 214 if (!lapic_is_integrated())
212 v |= APIC_LVT_LEVEL_TRIGGER; 215 v |= APIC_LVT_LEVEL_TRIGGER;
216
213 apic_write(APIC_LVT0, v); 217 apic_write(APIC_LVT0, v);
214} 218}
215 219
@@ -226,9 +230,13 @@ int get_physical_broadcast(void)
226 */ 230 */
227int lapic_get_maxlvt(void) 231int lapic_get_maxlvt(void)
228{ 232{
229 unsigned int v = apic_read(APIC_LVR); 233 unsigned int v;
230 234
231 /* 82489DXs do not report # of LVT entries. */ 235 v = apic_read(APIC_LVR);
236 /*
237 * - we always have APIC integrated on 64bit mode
238 * - 82489DXs do not report # of LVT entries
239 */
232 return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2; 240 return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
233} 241}
234 242