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: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
c87695ea74
commit
9df08f1095
@ -1081,40 +1081,43 @@ 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 (esr_disable) {
|
|
||||||
/*
|
|
||||||
* Something untraceable is creating bad interrupts on
|
|
||||||
* secondary quads ... for the moment, just leave the
|
|
||||||
* ESR disabled - we can't do anything useful with the
|
|
||||||
* errors anyway - mbligh
|
|
||||||
*/
|
|
||||||
printk(KERN_INFO "Leaving ESR disabled.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/* !82489DX */
|
|
||||||
maxlvt = lapic_get_maxlvt();
|
|
||||||
if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
|
|
||||||
apic_write(APIC_ESR, 0);
|
|
||||||
oldvalue = apic_read(APIC_ESR);
|
|
||||||
|
|
||||||
/* enables sending errors */
|
if (!lapic_is_integrated()) {
|
||||||
value = ERROR_APIC_VECTOR;
|
|
||||||
apic_write(APIC_LVTERR, value);
|
|
||||||
/*
|
|
||||||
* spec says clear errors after enabling vector.
|
|
||||||
*/
|
|
||||||
if (maxlvt > 3)
|
|
||||||
apic_write(APIC_ESR, 0);
|
|
||||||
value = apic_read(APIC_ESR);
|
|
||||||
if (value != oldvalue)
|
|
||||||
apic_printk(APIC_VERBOSE, "ESR value before enabling "
|
|
||||||
"vector: 0x%08lx after: 0x%08lx\n",
|
|
||||||
oldvalue, value);
|
|
||||||
} else {
|
|
||||||
printk(KERN_INFO "No ESR for 82489DX.\n");
|
printk(KERN_INFO "No ESR for 82489DX.\n");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (esr_disable) {
|
||||||
|
/*
|
||||||
|
* Something untraceable is creating bad interrupts on
|
||||||
|
* secondary quads ... for the moment, just leave the
|
||||||
|
* ESR disabled - we can't do anything useful with the
|
||||||
|
* errors anyway - mbligh
|
||||||
|
*/
|
||||||
|
printk(KERN_INFO "Leaving ESR disabled.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
maxlvt = lapic_get_maxlvt();
|
||||||
|
if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
|
||||||
|
apic_write(APIC_ESR, 0);
|
||||||
|
oldvalue = apic_read(APIC_ESR);
|
||||||
|
|
||||||
|
/* enables sending errors */
|
||||||
|
value = ERROR_APIC_VECTOR;
|
||||||
|
apic_write(APIC_LVTERR, value);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* spec says clear errors after enabling vector.
|
||||||
|
*/
|
||||||
|
if (maxlvt > 3)
|
||||||
|
apic_write(APIC_ESR, 0);
|
||||||
|
value = apic_read(APIC_ESR);
|
||||||
|
if (value != oldvalue)
|
||||||
|
apic_printk(APIC_VERBOSE, "ESR value before enabling "
|
||||||
|
"vector: 0x%08x after: 0x%08x\n",
|
||||||
|
oldvalue, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user