All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix ACPI IRQ level weirdness
@ 2002-09-26 21:17 Andy Grover
       [not found] ` <Pine.LNX.4.44.0209261409380.28213-100000-SNx59YkgthvyYw2uXbqB2185lzT46atW@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Grover @ 2002-09-26 21:17 UTC (permalink / raw)
  To: acpi-devel-pyega4qmqnRoyOMFzWx49A,
	torvalds-Lhe3bsMrZseB+jHODAdFcQ, berndp-p32f3XyCuykqcZcGjlUOXw

Hi Linus,

Could you please give this patch a go, and if it works, please apply?

This patch aborts the setting of the ACPI interrupt's level and trigger to
what we think it should be if there is an interrupt source override for
it.

Regards -- Andy

===== arch/i386/kernel/mpparse.c 1.20 vs edited =====
--- 1.20/arch/i386/kernel/mpparse.c	Thu Sep 19 18:14:32 2002
+++ edited/arch/i386/kernel/mpparse.c	Thu Sep 26 14:04:03 2002
@@ -1019,10 +1019,39 @@
 
 /* Ensure the ACPI SCI interrupt level is active low, edge-triggered */
 
+extern FADT_DESCRIPTOR acpi_fadt;
+
 void __init mp_config_ioapic_for_sci(int irq)
 {
 	int ioapic;
 	int ioapic_pin;
+	struct acpi_table_madt *madt;
+	struct acpi_table_int_src_ovr *entry = NULL;
+	void *madt_end;
+	acpi_status status;
+
+	/*
+	 * Ensure that if there is an interrupt source override entry
+	 * for the ACPI SCI, we leave it as is. Unfortunately this involves
+	 * walking the MADT again.
+	 */
+	status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
+		(acpi_table_header **) &madt);
+	if (ACPI_SUCCESS(status)) {
+		madt_end = madt + madt->header.length;
+
+		entry = (struct acpi_table_int_src_ovr *)
+                ((unsigned long) madt + sizeof(struct acpi_table_madt));
+
+		while ((void *) entry < madt_end) {
+                	if (entry->header.type == ACPI_MADT_INT_SRC_OVR &&
+			    acpi_fadt.sci_int == entry->global_irq)
+                		return;
+
+                	entry = (struct acpi_table_int_src_ovr *)
+                	        ((unsigned long) entry + entry->header.length);
+        	}
+	}
 
 	ioapic = mp_find_ioapic(irq);
 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

end of thread, other threads:[~2002-09-27  7:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-26 21:17 [PATCH] Fix ACPI IRQ level weirdness Andy Grover
     [not found] ` <Pine.LNX.4.44.0209261409380.28213-100000-SNx59YkgthvyYw2uXbqB2185lzT46atW@public.gmane.org>
2002-09-26 22:59   ` Linus Torvalds
2002-09-27  1:12   ` Jamin W. Collins
2002-09-27  7:02   ` Hiromichi Ito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.