]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: apic unification - merge down lapic_get_maxlvt
authorCyrill Gorcunov <gorcunov@gmail.com>
Thu, 24 Jul 2008 11:52:28 +0000 (13:52 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 24 Jul 2008 11:52:28 +0000 (13:52 +0200)
No code change on binary level.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: macro@linux-mips.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic_32.c
arch/x86/kernel/apic_64.c

index d6c8983583713d747790587861318a5fb58eb342..447dd8c5c0e94aead5f75189ec9f8082b1fd2fa2 100644 (file)
@@ -193,9 +193,13 @@ int get_physical_broadcast(void)
  */
 int lapic_get_maxlvt(void)
 {
-       unsigned int v = apic_read(APIC_LVR);
+       unsigned int v;
 
-       /* 82489DXs do not report # of LVT entries. */
+       v = apic_read(APIC_LVR);
+       /*
+        * - 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;
 }
 
index 7f1f030da7ee4c048990eecf9dc00229472028ca..4fa2a8620c265cf31959d224041f11e4eed32e75 100644 (file)
@@ -158,11 +158,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;
 }
 
 /*