From 9197287b493813427e931645131cdf9c2aab162a Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 24 Jul 2008 13:52:28 +0200 Subject: [PATCH] --- yaml --- r: 112702 b: refs/heads/master c: 36a028de785c6e6f15ac84f8b3b087b89137ea26 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/apic_32.c | 8 ++++++-- trunk/arch/x86/kernel/apic_64.c | 9 ++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index c70035130281..6e3cac03fdc7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 32f71aff77b6470d272f80ac28f43f9601c4d140 +refs/heads/master: 36a028de785c6e6f15ac84f8b3b087b89137ea26 diff --git a/trunk/arch/x86/kernel/apic_32.c b/trunk/arch/x86/kernel/apic_32.c index d6c898358371..447dd8c5c0e9 100644 --- a/trunk/arch/x86/kernel/apic_32.c +++ b/trunk/arch/x86/kernel/apic_32.c @@ -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; } diff --git a/trunk/arch/x86/kernel/apic_64.c b/trunk/arch/x86/kernel/apic_64.c index 7f1f030da7ee..4fa2a8620c26 100644 --- a/trunk/arch/x86/kernel/apic_64.c +++ b/trunk/arch/x86/kernel/apic_64.c @@ -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; } /*