Commit 9df08f10 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Ingo Molnar

x86: apic - lapic_setup_esr does not handle esr_disable - fix it

lapic_setup_esr doesn't handle esr_disable inquire.
The error brought in during unification process.
Fix it.
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent c87695ea
...@@ -1081,8 +1081,13 @@ void __init init_bsp_APIC(void) ...@@ -1081,8 +1081,13 @@ void __init init_bsp_APIC(void)
static void __cpuinit lapic_setup_esr(void) static void __cpuinit lapic_setup_esr(void)
{ {
unsigned long oldvalue, value, maxlvt; unsigned int oldvalue, value, maxlvt;
if (lapic_is_integrated() && !esr_disable) {
if (!lapic_is_integrated()) {
printk(KERN_INFO "No ESR for 82489DX.\n");
return;
}
if (esr_disable) { if (esr_disable) {
/* /*
* Something untraceable is creating bad interrupts on * Something untraceable is creating bad interrupts on
...@@ -1093,7 +1098,7 @@ static void __cpuinit lapic_setup_esr(void) ...@@ -1093,7 +1098,7 @@ static void __cpuinit lapic_setup_esr(void)
printk(KERN_INFO "Leaving ESR disabled.\n"); printk(KERN_INFO "Leaving ESR disabled.\n");
return; return;
} }
/* !82489DX */
maxlvt = lapic_get_maxlvt(); maxlvt = lapic_get_maxlvt();
if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
apic_write(APIC_ESR, 0); apic_write(APIC_ESR, 0);
...@@ -1102,6 +1107,7 @@ static void __cpuinit lapic_setup_esr(void) ...@@ -1102,6 +1107,7 @@ static void __cpuinit lapic_setup_esr(void)
/* enables sending errors */ /* enables sending errors */
value = ERROR_APIC_VECTOR; value = ERROR_APIC_VECTOR;
apic_write(APIC_LVTERR, value); apic_write(APIC_LVTERR, value);
/* /*
* spec says clear errors after enabling vector. * spec says clear errors after enabling vector.
*/ */
...@@ -1110,11 +1116,8 @@ static void __cpuinit lapic_setup_esr(void) ...@@ -1110,11 +1116,8 @@ static void __cpuinit lapic_setup_esr(void)
value = apic_read(APIC_ESR); value = apic_read(APIC_ESR);
if (value != oldvalue) if (value != oldvalue)
apic_printk(APIC_VERBOSE, "ESR value before enabling " apic_printk(APIC_VERBOSE, "ESR value before enabling "
"vector: 0x%08lx after: 0x%08lx\n", "vector: 0x%08x after: 0x%08x\n",
oldvalue, value); oldvalue, value);
} else {
printk(KERN_INFO "No ESR for 82489DX.\n");
}
} }
......
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