diff options
-rw-r--r-- | arch/x86/kernel/apic_32.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/apic_64.c | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index d6c898358371..447dd8c5c0e9 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -193,9 +193,13 @@ int get_physical_broadcast(void) | |||
193 | */ | 193 | */ |
194 | int lapic_get_maxlvt(void) | 194 | int lapic_get_maxlvt(void) |
195 | { | 195 | { |
196 | unsigned int v = apic_read(APIC_LVR); | 196 | unsigned int v; |
197 | 197 | ||
198 | /* 82489DXs do not report # of LVT entries. */ | 198 | v = apic_read(APIC_LVR); |
199 | /* | ||
200 | * - we always have APIC integrated on 64bit mode | ||
201 | * - 82489DXs do not report # of LVT entries | ||
202 | */ | ||
199 | return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2; | 203 | return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2; |
200 | } | 204 | } |
201 | 205 | ||
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 7f1f030da7ee..4fa2a8620c26 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -158,11 +158,14 @@ void __cpuinit enable_NMI_through_LVT0(void) | |||
158 | */ | 158 | */ |
159 | int lapic_get_maxlvt(void) | 159 | int lapic_get_maxlvt(void) |
160 | { | 160 | { |
161 | unsigned int v, maxlvt; | 161 | unsigned int v; |
162 | 162 | ||
163 | v = apic_read(APIC_LVR); | 163 | v = apic_read(APIC_LVR); |
164 | maxlvt = GET_APIC_MAXLVT(v); | 164 | /* |
165 | return maxlvt; | 165 | * - we always have APIC integrated on 64bit mode |
166 | * - 82489DXs do not report # of LVT entries | ||
167 | */ | ||
168 | return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2; | ||
166 | } | 169 | } |
167 | 170 | ||
168 | /* | 171 | /* |