linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-2.4.22-pre3_clear-smi-fix_A0
@ 2003-07-07 21:54 john stultz
  2003-07-08  9:17 ` Maciej W. Rozycki
  0 siblings, 1 reply; 2+ messages in thread
From: john stultz @ 2003-07-07 21:54 UTC (permalink / raw)
  To: marcelo; +Cc: Alan Cox, lkml

Marcelo, all,

	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, which can cause
problems with console redirection as well keeping us from being able to
transition into full ACPI mode. 

This patch (back ported from 2.5) 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, booting with full ACPI works and SMIs function
properly. 

Please apply

thanks
-john


diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
--- a/arch/i386/kernel/io_apic.c	Mon Jul  7 14:00:31 2003
+++ b/arch/i386/kernel/io_apic.c	Mon Jul  7 14:00:31 2003
@@ -169,6 +169,14 @@
 {
 	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:




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] linux-2.4.22-pre3_clear-smi-fix_A0
  2003-07-07 21:54 [PATCH] linux-2.4.22-pre3_clear-smi-fix_A0 john stultz
@ 2003-07-08  9:17 ` Maciej W. Rozycki
  0 siblings, 0 replies; 2+ messages in thread
From: Maciej W. Rozycki @ 2003-07-08  9:17 UTC (permalink / raw)
  To: john stultz; +Cc: marcelo, Alan Cox, lkml

On 7 Jul 2003, john stultz wrote:

> 	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, which can cause
> problems with console redirection as well keeping us from being able to
> transition into full ACPI mode. 

 That should be appropriately marked in the MP-table -- is it?  I think
clear_IO_APIC() should use the MP-table to select pins marked as mp_INT
(and possibly mp_ExtINT) only.  This way all special inputs are preserved.

 Your solution looks like a good hack for working around a broken
MP-table, but then a big fat warning should be printed about a BIOS bug.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-08  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-07 21:54 [PATCH] linux-2.4.22-pre3_clear-smi-fix_A0 john stultz
2003-07-08  9:17 ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).