Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc IRQ0 is perfectly legal to use on at least ...



details:   https://anonhg.NetBSD.org/src/rev/a1cada366c1d
branches:  trunk
changeset: 359948:a1cada366c1d
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Mar 02 19:36:19 2018 +0000

description:
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

diffstat:

 sys/arch/powerpc/pci/pci_machdep_common.c |  12 +++++++-----
 sys/arch/powerpc/pic/pic_openpic.c        |   6 +++---
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (75 lines):

diff -r 92357e3abbdb -r a1cada366c1d sys/arch/powerpc/pci/pci_machdep_common.c
--- a/sys/arch/powerpc/pci/pci_machdep_common.c Fri Mar 02 14:45:23 2018 +0000
+++ b/sys/arch/powerpc/pci/pci_machdep_common.c Fri Mar 02 19:36:19 2018 +0000
@@ -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 @@
 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 @@
 {
 
 #ifdef ICU_LEN
-       if (ih == 0 || ih >= ICU_LEN
+       if (ih >= ICU_LEN
 #ifdef IRQ_SLAVE
            || ih == IRQ_SLAVE
 #endif
@@ -245,8 +245,10 @@
         * 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
diff -r 92357e3abbdb -r a1cada366c1d sys/arch/powerpc/pic/pic_openpic.c
--- a/sys/arch/powerpc/pic/pic_openpic.c        Fri Mar 02 14:45:23 2018 +0000
+++ b/sys/arch/powerpc/pic/pic_openpic.c        Fri Mar 02 19:36:19 2018 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index