Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Another ACPI interrupt patch for testing
Hi all,
the attached patch is to address the issue from pR 37001:
LNKE: ACPI: Found matching pin for 1.8.INTA at func 0: 11
LNKB: ACPI: Found matching pin for 1.8.INTA at func 0: 11
LNKB: BIOS IRQ 11 for 1.8.INTA is invalid
It means that the DSDT provides interrupt handling information twice. It
seems like generally the *first* should be used (e.g. that's how Linux
behaves). We don't do that right now and I would like to get us much
testing for the patch as possible, as I don't want to break anything.
Please report any intterupt issues you have with this (and without :-))
Joerg
Index: mpacpi.c
===================================================================
RCS file: /data/repo/netbsd/src/sys/arch/x86/x86/mpacpi.c,v
retrieving revision 1.58
diff -u -p -r1.58 mpacpi.c
--- mpacpi.c 26 Apr 2008 15:13:00 -0000 1.58
+++ mpacpi.c 29 May 2008 20:14:26 -0000
@@ -690,7 +690,7 @@ mpacpi_pciroute(struct mpacpi_pcibus *mp
ACPI_PCI_ROUTING_TABLE *ptrp;
ACPI_HANDLE linkdev;
char *p;
- struct mp_intr_map *mpi;
+ struct mp_intr_map *mpi, *iter;
struct mp_bus *mpb;
struct pic *pic;
unsigned dev;
@@ -714,11 +714,25 @@ mpacpi_pciroute(struct mpacpi_pcibus *mp
break;
dev = ACPI_HIWORD(ptrp->Address);
- mpi = &mp_intrs[mpacpi_intr_index++];
+ mpi = &mp_intrs[mpacpi_intr_index];
mpi->bus_pin = (dev << 2) | ptrp->Pin;
mpi->bus = mpb;
mpi->type = MPS_INTTYPE_INT;
+ /*
+ * First check if an entry for this device/pin combination
+ * was already found. Some DSDTs have more than one entry
+ * and it seems that the first is generally the right one.
+ */
+ for (iter = mpb->mb_intrs; iter != NULL; iter = iter->next) {
+ if (iter->bus_pin == mpi->bus_pin)
+ break;
+ }
+ if (iter != NULL)
+ continue;
+
+ ++mpacpi_intr_index;
+
if (ptrp->Source[0] != 0) {
if (mp_verbose > 1)
printf("pciroute: dev %d INT%c on lnkdev %s\n",
Home |
Main Index |
Thread Index |
Old Index