summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-07-24 13:52:28 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-24 13:52:28 +0200
commit36a028de785c6e6f15ac84f8b3b087b89137ea26 (patch)
treeb72dd3de4bdbbb556b6e5bf770993f7b0937a830 /arch/x86/kernel/apic_64.c
parentx86: PIC, L-APIC and I/O APIC debug information (diff)
downloadlinux-36a028de785c6e6f15ac84f8b3b087b89137ea26.tar.xz
linux-36a028de785c6e6f15ac84f8b3b087b89137ea26.zip
x86: apic unification - merge down lapic_get_maxlvt
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>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c9
1 files changed, 6 insertions, 3 deletions
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)
*/
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;
}
/*