Source-Changes-HG archive

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

[src/trunk]: src/sys Use IPL_VM for dwc2_intr and mark as MP safe where possi...



details:   https://anonhg.NetBSD.org/src/rev/d409330a5d6e
branches:  trunk
changeset: 339605:d409330a5d6e
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Jul 30 07:32:40 2015 +0000

description:
Use IPL_VM for dwc2_intr and mark as MP safe where possible.

diffstat:

 sys/arch/arm/amlogic/amlogic_dwctwo.c    |  8 ++++----
 sys/arch/arm/broadcom/bcm2835_dwctwo.c   |  8 ++++----
 sys/arch/arm/rockchip/rockchip_dwctwo.c  |  8 ++++----
 sys/arch/mips/cavium/dev/octeon_dwctwo.c |  6 +++---
 sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c |  6 +++---
 sys/external/bsd/dwc2/dwc2.h             |  4 ++--
 6 files changed, 20 insertions(+), 20 deletions(-)

diffs (159 lines):

diff -r 6228cbc65e26 -r d409330a5d6e sys/arch/arm/amlogic/amlogic_dwctwo.c
--- a/sys/arch/arm/amlogic/amlogic_dwctwo.c     Thu Jul 30 05:43:42 2015 +0000
+++ b/sys/arch/arm/amlogic/amlogic_dwctwo.c     Thu Jul 30 07:32:40 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amlogic_dwctwo.c,v 1.3 2015/07/22 10:32:16 skrll Exp $ */
+/*     $NetBSD: amlogic_dwctwo.c,v 1.4 2015/07/30 07:32:40 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amlogic_dwctwo.c,v 1.3 2015/07/22 10:32:16 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_dwctwo.c,v 1.4 2015/07/30 07:32:40 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -118,8 +118,8 @@
        aprint_naive("\n");
        aprint_normal(": USB controller\n");
 
-       sc->sc_ih = intr_establish(loc->loc_intr, IPL_SCHED,
-          IST_LEVEL, dwc2_intr, &sc->sc_dwc2);
+       sc->sc_ih = intr_establish(loc->loc_intr, IPL_VM,
+          IST_LEVEL | IST_MPSAFE, dwc2_intr, &sc->sc_dwc2);
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt %d\n",
                     loc->loc_intr);
diff -r 6228cbc65e26 -r d409330a5d6e sys/arch/arm/broadcom/bcm2835_dwctwo.c
--- a/sys/arch/arm/broadcom/bcm2835_dwctwo.c    Thu Jul 30 05:43:42 2015 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_dwctwo.c    Thu Jul 30 07:32:40 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_dwctwo.c,v 1.4 2015/07/29 14:22:49 skrll Exp $ */
+/*     $NetBSD: bcm2835_dwctwo.c,v 1.5 2015/07/30 07:32:40 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_dwctwo.c,v 1.4 2015/07/29 14:22:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_dwctwo.c,v 1.5 2015/07/30 07:32:40 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -130,8 +130,8 @@
        aprint_naive(": USB controller\n");
        aprint_normal(": USB controller\n");
 
-       sc->sc_ih = intr_establish(aaa->aaa_intr, IPL_SCHED, IST_LEVEL,
-          dwc2_intr, &sc->sc_dwc2);
+       sc->sc_ih = intr_establish(aaa->aaa_intr, IPL_VM,
+           IST_LEVEL | IST_MPSAFE, dwc2_intr, &sc->sc_dwc2);
 
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt %d\n",
diff -r 6228cbc65e26 -r d409330a5d6e sys/arch/arm/rockchip/rockchip_dwctwo.c
--- a/sys/arch/arm/rockchip/rockchip_dwctwo.c   Thu Jul 30 05:43:42 2015 +0000
+++ b/sys/arch/arm/rockchip/rockchip_dwctwo.c   Thu Jul 30 07:32:40 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rockchip_dwctwo.c,v 1.3 2015/07/22 10:32:16 skrll Exp $        */
+/*     $NetBSD: rockchip_dwctwo.c,v 1.4 2015/07/30 07:32:40 skrll Exp $        */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rockchip_dwctwo.c,v 1.3 2015/07/22 10:32:16 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rockchip_dwctwo.c,v 1.4 2015/07/30 07:32:40 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -125,8 +125,8 @@
        aprint_naive(": USB controller\n");
        aprint_normal(": USB controller\n");
 
-       sc->sc_ih = intr_establish(obio->obio_intr, IPL_SCHED,
-          IST_LEVEL, dwc2_intr, &sc->sc_dwc2);
+       sc->sc_ih = intr_establish(obio->obio_intr, IPL_VM,
+          IST_LEVEL | IST_MPSAFE, dwc2_intr, &sc->sc_dwc2);
 #if 0
           IST_EDGE, dwc2_intr, &sc->sc_dwc2);
 #endif
diff -r 6228cbc65e26 -r d409330a5d6e sys/arch/mips/cavium/dev/octeon_dwctwo.c
--- a/sys/arch/mips/cavium/dev/octeon_dwctwo.c  Thu Jul 30 05:43:42 2015 +0000
+++ b/sys/arch/mips/cavium/dev/octeon_dwctwo.c  Thu Jul 30 07:32:40 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: octeon_dwctwo.c,v 1.4 2015/07/22 10:32:16 skrll Exp $  */
+/*     $NetBSD: octeon_dwctwo.c,v 1.5 2015/07/30 07:32:40 skrll Exp $  */
 
 /*
  * Copyright (c) 2015 Masao Uebayashi <uebayasi%tombiinc.com@localhost>
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: octeon_dwctwo.c,v 1.4 2015/07/22 10:32:16 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_dwctwo.c,v 1.5 2015/07/30 07:32:40 skrll Exp $");
 
 #include "opt_octeon.h"
 #include "opt_usb.h"
@@ -309,7 +309,7 @@
            config_found(sc->sc_dwc2.sc_dev, &sc->sc_dwc2.sc_bus, usbctlprint);
 
        sc->sc_ih = octeon_intr_establish(ffs64(CIU_INTX_SUM0_USB) - 1,
-           IPL_BIO, dwc2_intr, sc);
+           IPL_VM, dwc2_intr, sc);
        if (sc->sc_ih == NULL)
                panic("can't establish common interrupt\n");
 }
diff -r 6228cbc65e26 -r d409330a5d6e sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c
--- a/sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c  Thu Jul 30 05:43:42 2015 +0000
+++ b/sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c  Thu Jul 30 07:32:40 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwctwo_plb.c,v 1.3 2014/09/02 14:55:56 skrll Exp $ */
+/* $NetBSD: dwctwo_plb.c,v 1.4 2015/07/30 07:32:40 skrll Exp $ */
 /*
  * Copyright (c) 2013 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwctwo_plb.c,v 1.3 2014/09/02 14:55:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwctwo_plb.c,v 1.4 2015/07/30 07:32:40 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -112,7 +112,7 @@
        bus_space_map(sc->sc_iot, paa->plb_addr, DWCTWO_SIZE, 0, &sc->sc_ioh);
        sc->sc_bus.dmatag = paa->plb_dmat;
 
-       intr_establish(paa->plb_irq, IST_LEVEL, IPL_SCHED, dwc2_intr, sc);
+       intr_establish(paa->plb_irq, IST_LEVEL, IPL_VM, dwc2_intr, sc);
 
        /* Enable the USB interface. */
        mtsdr(DCR_SDR0_PFC1, mfsdr(DCR_SDR0_PFC1) | SDR0_PFC1_USBEN);
diff -r 6228cbc65e26 -r d409330a5d6e sys/external/bsd/dwc2/dwc2.h
--- a/sys/external/bsd/dwc2/dwc2.h      Thu Jul 30 05:43:42 2015 +0000
+++ b/sys/external/bsd/dwc2/dwc2.h      Thu Jul 30 07:32:40 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2.h,v 1.4 2014/12/23 16:20:06 macallan Exp $        */
+/*     $NetBSD: dwc2.h,v 1.5 2015/07/30 07:32:40 skrll Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -119,7 +119,7 @@
 #define usleep_range(l, u)     do { DELAY(u); } while (0)
 
 #define spinlock_t             kmutex_t
-#define spin_lock_init(lock)   mutex_init(lock, MUTEX_DEFAULT, IPL_SCHED)
+#define spin_lock_init(lock)   mutex_init(lock, MUTEX_DEFAULT, IPL_VM)
 #define        spin_lock(l)            do { mutex_spin_enter(l); } while (0)
 #define        spin_unlock(l)          do { mutex_spin_exit(l); } while (0)
 



Home | Main Index | Thread Index | Old Index