Commit 18916f56 authored by Andrew Morton's avatar Andrew Morton Committed by Patrick Mochel

[PATCH] SMI clearing fix

From: john stultz <johnstul@us.ibm.com>

I've been having problems with ACPI on a box here in our lab.  Some of our
more recent hardware requires that SMIs are routed through the IOAPIC, thus
when we clear_IO_APIC() at boot time, we clear the BIOS initialized SMI
pin.  This basically clobbers the SMI so we can then never make the
transition into ACPI mode.

This patch simply reads the apic entry in clear_IO_APIC to make sure the
delivery_mode isn't dest_SMI.  If it is, we leave the apic entry alone and
return.

With this patch, the box boots and SMIs function properly.
parent ae30053e
......@@ -220,6 +220,14 @@ void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
struct IO_APIC_route_entry entry;
unsigned long flags;
/* Check delivery_mode to be sure we're not clearing an SMI pin */
spin_lock_irqsave(&ioapic_lock, flags);
*(((int*)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
*(((int*)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
spin_unlock_irqrestore(&ioapic_lock, flags);
if (entry.delivery_mode == dest_SMI)
return;
/*
* Disable it in the IO-APIC irq-routing table:
*/
......
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