Commit 36a028de authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Ingo Molnar

x86: apic unification - merge down lapic_get_maxlvt

No code change on binary level.
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Cc: macro@linux-mips.org
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 32f71aff
...@@ -193,9 +193,13 @@ int get_physical_broadcast(void) ...@@ -193,9 +193,13 @@ int get_physical_broadcast(void)
*/ */
int lapic_get_maxlvt(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; return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
} }
......
...@@ -158,11 +158,14 @@ void __cpuinit enable_NMI_through_LVT0(void) ...@@ -158,11 +158,14 @@ void __cpuinit enable_NMI_through_LVT0(void)
*/ */
int lapic_get_maxlvt(void) int lapic_get_maxlvt(void)
{ {
unsigned int v, maxlvt; unsigned int v;
v = apic_read(APIC_LVR); 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;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment