Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen When using the intr_establish_xname() interface...



details:   https://anonhg.NetBSD.org/src/rev/cbf4229a5942
branches:  trunk
changeset: 994185:cbf4229a5942
user:      cherry <cherry%NetBSD.org@localhost>
date:      Wed Oct 24 03:59:33 2018 +0000

description:
When using the intr_establish_xname() interface to register
XEN events, follow established x86/intr.c conventions - set
the 'legacy' irq value to -1, to indicate that the pic, pin
combination (&xen_pic, port) is used for registration.

diffstat:

 sys/arch/xen/x86/xen_ipi.c           |  8 ++++----
 sys/arch/xen/xen/clock.c             |  6 +++---
 sys/arch/xen/xen/if_xennet_xenbus.c  |  6 +++---
 sys/arch/xen/xen/pciback.c           |  6 +++---
 sys/arch/xen/xen/xbd_xenbus.c        |  6 +++---
 sys/arch/xen/xen/xbdback_xenbus.c    |  6 +++---
 sys/arch/xen/xen/xencons.c           |  8 ++++----
 sys/arch/xen/xen/xenevt.c            |  6 +++---
 sys/arch/xen/xen/xennetback_xenbus.c |  6 +++---
 sys/arch/xen/xen/xpci_xenbus.c       |  6 +++---
 sys/arch/xen/xenbus/xenbus_comms.c   |  6 +++---
 11 files changed, 35 insertions(+), 35 deletions(-)

diffs (truncated from 310 to 300 lines):

diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/x86/xen_ipi.c
--- a/sys/arch/xen/x86/xen_ipi.c        Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/x86/xen_ipi.c        Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
 
 /* 
  * Based on: x86/ipi.c
- * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $");
+ * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $");
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.26 2018/07/24 12:26:14 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_ddb.h"
 
@@ -137,7 +137,7 @@
        snprintf(intr_xname, sizeof(intr_xname), "%s ipi",
            device_xname(ci->ci_dev));
 
-       if (intr_establish_xname(0, &xen_pic, evtchn, IST_LEVEL, IPL_HIGH,
+       if (intr_establish_xname(-1, &xen_pic, evtchn, IST_LEVEL, IPL_HIGH,
                xen_ipi_handler, ci, true, intr_xname) == NULL) {
                panic("%s: unable to register ipi handler\n", __func__);
                /* NOTREACHED */
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/clock.c
--- a/sys/arch/xen/xen/clock.c  Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/clock.c  Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.70 2018/06/30 14:59:38 riastradh Exp $     */
+/*     $NetBSD: clock.c,v 1.71 2018/10/24 03:59:33 cherry Exp $        */
 
 /*-
  * Copyright (c) 2017, 2018 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.70 2018/06/30 14:59:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.71 2018/10/24 03:59:33 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -763,7 +763,7 @@
        snprintf(intr_xname, sizeof(intr_xname), "%s clock",
            device_xname(ci->ci_dev));
        /* XXX sketchy function pointer cast -- fix the API, please */
-       ci->ci_xen_timer_intrhand = intr_establish_xname(0, &xen_pic, evtch,
+       ci->ci_xen_timer_intrhand = intr_establish_xname(-1, &xen_pic, evtch,
            IST_LEVEL, IPL_CLOCK, (int (*)(void *))xen_timer_handler, ci, true,
            intr_xname);
        if (ci->ci_xen_timer_intrhand == NULL)
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.79 2018/09/03 16:29:29 riastradh Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.80 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.79 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.80 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -517,7 +517,7 @@
                goto abort_resume;
        aprint_verbose_dev(dev, "using event channel %d\n",
            sc->sc_evtchn);
-       sc->sc_ih = intr_establish_xname(0, &xen_pic, sc->sc_evtchn, IST_LEVEL,
+       sc->sc_ih = intr_establish_xname(-1, &xen_pic, sc->sc_evtchn, IST_LEVEL,
            IPL_NET, &xennet_handler, sc, false, device_xname(dev));
        KASSERT(sc->sc_ih != NULL);
        return true;
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/pciback.c
--- a/sys/arch/xen/xen/pciback.c        Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/pciback.c        Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: pciback.c,v 1.15 2018/10/08 05:42:44 cherry Exp $      */
+/*      $NetBSD: pciback.c,v 1.16 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2009 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciback.c,v 1.15 2018/10/08 05:42:44 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciback.c,v 1.16 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 
@@ -619,7 +619,7 @@
                x86_sfence();
                xenbus_switch_state(xbusd, NULL, XenbusStateConnected);
                x86_sfence();
-               pbxi->pbx_ih = intr_establish_xname(0, &xen_pic, pbxi->pbx_evtchn, IST_LEVEL, IPL_BIO,
+               pbxi->pbx_ih = intr_establish_xname(-1, &xen_pic, pbxi->pbx_evtchn, IST_LEVEL, IPL_BIO,
                    pciback_xenbus_evthandler, pbxi, true, "pciback");
                KASSERT(pbxi->pbx_ih != NULL);
                hypervisor_enable_event(pbxi->pbx_evtchn);
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c     Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c     Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.88 2018/08/26 21:04:16 jdolecek Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.89 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.88 2018/08/26 21:04:16 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.89 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 
@@ -465,7 +465,7 @@
 
        aprint_verbose_dev(dev, "using event channel %d\n",
            sc->sc_evtchn);
-       sc->sc_ih = intr_establish_xname(0, &xen_pic, sc->sc_evtchn, IST_LEVEL,
+       sc->sc_ih = intr_establish_xname(-1, &xen_pic, sc->sc_evtchn, IST_LEVEL,
            IPL_BIO, &xbd_handler, sc, false, device_xname(dev));
        KASSERT(sc->sc_ih != NULL);
 
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/xbdback_xenbus.c
--- a/sys/arch/xen/xen/xbdback_xenbus.c Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/xbdback_xenbus.c Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbdback_xenbus.c,v 1.67 2018/06/24 20:28:58 jdolecek Exp $      */
+/*      $NetBSD: xbdback_xenbus.c,v 1.68 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.67 2018/06/24 20:28:58 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.68 2018/10/24 03:59:33 cherry Exp $");
 
 #include <sys/atomic.h>
 #include <sys/buf.h>
@@ -644,7 +644,7 @@
        XENPRINTF(("xbdback %s: connect evchannel %d\n", xbusd->xbusd_path, xbdi->xbdi_evtchn));
        xbdi->xbdi_evtchn = evop.u.bind_interdomain.local_port;
 
-       xbdi->xbdi_ih = intr_establish_xname(0, &xen_pic, xbdi->xbdi_evtchn,
+       xbdi->xbdi_ih = intr_establish_xname(-1, &xen_pic, xbdi->xbdi_evtchn,
            IST_LEVEL, IPL_BIO, xbdback_evthandler, xbdi, false,
            xbdi->xbdi_name);
        KASSERT(xbdi->xbdi_ih != NULL);
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/xencons.c
--- a/sys/arch/xen/xen/xencons.c        Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/xencons.c        Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xencons.c,v 1.44 2018/06/24 13:35:33 jdolecek Exp $    */
+/*     $NetBSD: xencons.c,v 1.45 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.44 2018/06/24 13:35:33 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.45 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 
@@ -233,7 +233,7 @@
                /* dom0 console resume is required only during first start-up */
                if (cold) {
                        evtch = bind_virq_to_evtch(VIRQ_CONSOLE);
-                       ih = intr_establish_xname(0, &xen_pic, evtch,
+                       ih = intr_establish_xname(-1, &xen_pic, evtch,
                            IST_LEVEL, IPL_TTY, xencons_intr,
                            xencons_console_device, false,
                            device_xname(dev));
@@ -241,7 +241,7 @@
                }
        } else {
                evtch = xen_start_info.console_evtchn;
-               ih = intr_establish_xname(0, &xen_pic, evtch,
+               ih = intr_establish_xname(-1, &xen_pic, evtch,
                    IST_LEVEL, IPL_TTY, xencons_handler,
                    xencons_console_device, false, device_xname(dev));
                KASSERT(ih != NULL);
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/xenevt.c
--- a/sys/arch/xen/xen/xenevt.c Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/xenevt.c Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xenevt.c,v 1.50 2018/10/17 03:43:24 cherry Exp $      */
+/*      $NetBSD: xenevt.c,v 1.51 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.50 2018/10/17 03:43:24 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.51 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 #include <sys/param.h>
@@ -183,7 +183,7 @@
        evtchn_port_t evtchn = xenevt_alloc_event();
 
        /* The real objective here is to wiggle into the ih callchain for IPL level */
-       ih = intr_establish_xname(0, &xen_pic, evtchn,  IST_LEVEL, level,
+       ih = intr_establish_xname(-1, &xen_pic, evtchn,  IST_LEVEL, level,
            xenevt_processevt, NULL, mpsafe, "xenevt");
 
        KASSERT(ih != NULL);
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/xennetback_xenbus.c
--- a/sys/arch/xen/xen/xennetback_xenbus.c      Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/xennetback_xenbus.c      Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xennetback_xenbus.c,v 1.69 2018/09/03 16:29:29 riastradh Exp $      */
+/*      $NetBSD: xennetback_xenbus.c,v 1.70 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.69 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.70 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 
@@ -556,7 +556,7 @@
        xneti->xni_status = CONNECTED;
        xen_wmb();
 
-       xneti->xni_ih = intr_establish_xname(0, &xen_pic, xneti->xni_evtchn,
+       xneti->xni_ih = intr_establish_xname(-1, &xen_pic, xneti->xni_evtchn,
            IST_LEVEL, IPL_NET, xennetback_evthandler, xneti, false,
            xneti->xni_if.if_xname);
        KASSERT(xneti->xni_ih != NULL);
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xen/xpci_xenbus.c
--- a/sys/arch/xen/xen/xpci_xenbus.c    Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xen/xpci_xenbus.c    Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xpci_xenbus.c,v 1.19 2018/10/08 05:42:45 cherry Exp $      */
+/*      $NetBSD: xpci_xenbus.c,v 1.20 2018/10/24 03:59:33 cherry Exp $      */
 
 /*
  * Copyright (c) 2009 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xpci_xenbus.c,v 1.19 2018/10/08 05:42:45 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xpci_xenbus.c,v 1.20 2018/10/24 03:59:33 cherry Exp $");
 
 #include "opt_xen.h"
 
@@ -188,7 +188,7 @@
        aprint_verbose_dev(sc->sc_dev, "using event channel %d\n",
            sc->sc_evtchn);
 #if 0
-       intr_establish_xname(0, &xen_pic, pbxi->pbx_evtchn, IST_LEVEL,
+       intr_establish_xname(-1, &xen_pic, pbxi->pbx_evtchn, IST_LEVEL,
            IPL_BIO, &xpci_handler, sc, true,
            device_xname(sc->sc_dev));
 #endif
diff -r 76bde6a8c802 -r cbf4229a5942 sys/arch/xen/xenbus/xenbus_comms.c
--- a/sys/arch/xen/xenbus/xenbus_comms.c        Wed Oct 24 03:51:21 2018 +0000
+++ b/sys/arch/xen/xenbus/xenbus_comms.c        Wed Oct 24 03:59:33 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xenbus_comms.c,v 1.18 2018/06/24 13:35:33 jdolecek Exp $ */
+/* $NetBSD: xenbus_comms.c,v 1.19 2018/10/24 03:59:33 cherry Exp $ */
 /******************************************************************************
  * xenbus_comms.c
  *
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xenbus_comms.c,v 1.18 2018/06/24 13:35:33 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenbus_comms.c,v 1.19 2018/10/24 03:59:33 cherry Exp $");
 
 #include <sys/types.h>



Home | Main Index | Thread Index | Old Index