Module Name: src Committed By: macallan Date: Fri Mar 2 19:36:19 UTC 2018
Modified Files: src/sys/arch/powerpc/pci: pci_machdep_common.c src/sys/arch/powerpc/pic: pic_openpic.c Log Message: IRQ0 is perfectly legal to use on at least some macppc, so don't treat it as an error or something special with this svwsata works on my PCI-X G5 To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/pci/pci_machdep_common.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/pic/pic_openpic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/pci/pci_machdep_common.c diff -u src/sys/arch/powerpc/pci/pci_machdep_common.c:1.22 src/sys/arch/powerpc/pci/pci_machdep_common.c:1.23 --- src/sys/arch/powerpc/pci/pci_machdep_common.c:1.22 Thu Jun 1 02:45:07 2017 +++ src/sys/arch/powerpc/pci/pci_machdep_common.c Fri Mar 2 19:36:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep_common.c,v 1.22 2017/06/01 02:45:07 chs Exp $ */ +/* $NetBSD: pci_machdep_common.c,v 1.23 2018/03/02 19:36:19 macallan Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_machdep_common.c,v 1.22 2017/06/01 02:45:07 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep_common.c,v 1.23 2018/03/02 19:36:19 macallan Exp $"); #define _POWERPC_BUS_DMA_PRIVATE @@ -89,7 +89,7 @@ const char * genppc_pci_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len) { #ifdef ICU_LEN - if (ih == 0 || ih >= ICU_LEN + if (ih >= ICU_LEN /* XXX on macppc it's completely legal to have PCI interrupts on a slave PIC */ #ifdef IRQ_SLAVE || ih == IRQ_SLAVE @@ -117,7 +117,7 @@ genppc_pci_intr_establish(void *v, pci_i { #ifdef ICU_LEN - if (ih == 0 || ih >= ICU_LEN + if (ih >= ICU_LEN #ifdef IRQ_SLAVE || ih == IRQ_SLAVE #endif @@ -245,8 +245,10 @@ genppc_pci_intr_map(const struct pci_att * Since IRQ 0 is only used by the clock, and we can't actually be sure * that the BIOS did its job, we also recognize that as meaning that * the BIOS has not configured the device. + * XXX + * it's perfectly legal to use IRQ 0 on macppc */ - if (line == 0 || line == 255) { + if (line == 255) { aprint_error("pci_intr_map: no mapping for pin %c\n", '@' + pin); goto bad; #ifdef ICU_LEN Index: src/sys/arch/powerpc/pic/pic_openpic.c diff -u src/sys/arch/powerpc/pic/pic_openpic.c:1.11 src/sys/arch/powerpc/pic/pic_openpic.c:1.12 --- src/sys/arch/powerpc/pic/pic_openpic.c:1.11 Thu Mar 1 16:03:02 2018 +++ src/sys/arch/powerpc/pic/pic_openpic.c Fri Mar 2 19:36:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pic_openpic.c,v 1.11 2018/03/01 16:03:02 macallan Exp $ */ +/* $NetBSD: pic_openpic.c,v 1.12 2018/03/02 19:36:19 macallan Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.11 2018/03/01 16:03:02 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.12 2018/03/02 19:36:19 macallan Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -144,7 +144,7 @@ opic_establish_irq(struct pic_ops *pic, x = irq; x |= OPENPIC_IMASK; - if (irq == 0 || type == IST_EDGE_RISING || type == IST_LEVEL_HIGH) + if (type == IST_EDGE_RISING || type == IST_LEVEL_HIGH) x |= OPENPIC_POLARITY_POSITIVE; else x |= OPENPIC_POLARITY_NEGATIVE;