Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/fdt Make IRQ sharing work again



details:   https://anonhg.NetBSD.org/src/rev/5d11cd134f29
branches:  trunk
changeset: 320371:5d11cd134f29
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Jul 03 12:12:03 2018 +0000

description:
Make IRQ sharing work again

diffstat:

 sys/arch/arm/fdt/gic_fdt.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 7cd7c5f65ef4 -r 5d11cd134f29 sys/arch/arm/fdt/gic_fdt.c
--- a/sys/arch/arm/fdt/gic_fdt.c        Tue Jul 03 11:45:54 2018 +0000
+++ b/sys/arch/arm/fdt/gic_fdt.c        Tue Jul 03 12:12:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic_fdt.c,v 1.10 2018/06/20 05:50:09 hkenken Exp $ */
+/* $NetBSD: gic_fdt.c,v 1.11 2018/07/03 12:12:03 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic_fdt.c,v 1.10 2018/06/20 05:50:09 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic_fdt.c,v 1.11 2018/07/03 12:12:03 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -75,6 +75,7 @@
 struct gic_fdt_irq {
        struct gic_fdt_softc    *intr_sc;
        void                    *intr_ih;
+       void                    *intr_arg;
        int                     intr_refcnt;
        int                     intr_ipl;
        int                     intr_level;
@@ -188,6 +189,7 @@
                firq = kmem_alloc(sizeof(*firq), KM_SLEEP);
                firq->intr_sc = sc;
                firq->intr_refcnt = 0;
+               firq->intr_arg = arg;
                firq->intr_ipl = ipl;
                firq->intr_level = level;
                firq->intr_mpsafe = mpsafe;
@@ -206,7 +208,7 @@
                }
                sc->sc_irq[irq] = firq;
        } else {
-               if (arg) {
+               if (firq->intr_arg == NULL && arg != NULL) {
                        device_printf(dev, "cannot share irq with NULL arg\n");
                        return NULL;
                }



Home | Main Index | Thread Index | Old Index