Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen Convert the last remaining users of event_s...
details: https://anonhg.NetBSD.org/src/rev/69c679917a55
branches: trunk
changeset: 993903:69c679917a55
user: cherry <cherry%NetBSD.org@localhost>
date: Mon Oct 08 05:42:44 2018 +0000
description:
Convert the last remaining users of event_set_handler() to
intr_establish_xname(,&xen_pic,...)
diffstat:
sys/arch/xen/xen/pciback.c | 14 +++++++-------
sys/arch/xen/xen/xpci_xenbus.c | 9 +++++----
2 files changed, 12 insertions(+), 11 deletions(-)
diffs (79 lines):
diff -r bffa6ddb45ef -r 69c679917a55 sys/arch/xen/xen/pciback.c
--- a/sys/arch/xen/xen/pciback.c Sun Oct 07 23:17:52 2018 +0000
+++ b/sys/arch/xen/xen/pciback.c Mon Oct 08 05:42:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciback.c,v 1.14 2018/06/24 20:15:00 jdolecek Exp $ */
+/* $NetBSD: pciback.c,v 1.15 2018/10/08 05:42:44 cherry Exp $ */
/*
* Copyright (c) 2009 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciback.c,v 1.14 2018/06/24 20:15:00 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciback.c,v 1.15 2018/10/08 05:42:44 cherry Exp $");
#include "opt_xen.h"
@@ -188,6 +188,7 @@
struct pciback_pci_devlist pbx_pb_pci_dev; /* list of exported PCI devices */
/* communication with the domU */
unsigned int pbx_evtchn; /* our even channel */
+ struct intrhand *pbx_ih;
struct xen_pci_sharedinfo *pbx_sh_info;
struct xen_pci_op op;
grant_handle_t pbx_shinfo_handle; /* to unmap shared page */
@@ -524,9 +525,7 @@
int err;
hypervisor_mask_event(pbxi->pbx_evtchn);
- event_remove_handler(pbxi->pbx_evtchn,
- pciback_xenbus_evthandler, pbxi);
-
+ intr_disestablish(pbxi->pbx_ih);
mutex_enter(&pb_xenbus_lock);
SLIST_REMOVE(&pb_xenbus_instances,
pbxi, pb_xenbus_instance, pbx_next);
@@ -620,8 +619,9 @@
x86_sfence();
xenbus_switch_state(xbusd, NULL, XenbusStateConnected);
x86_sfence();
- event_set_handler(pbxi->pbx_evtchn, pciback_xenbus_evthandler,
- pbxi, IPL_BIO, "pciback", "pciback"); // XXX intr info?
+ pbxi->pbx_ih = intr_establish_xname(0, &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);
hypervisor_notify_via_evtchn(pbxi->pbx_evtchn);
break;
diff -r bffa6ddb45ef -r 69c679917a55 sys/arch/xen/xen/xpci_xenbus.c
--- a/sys/arch/xen/xen/xpci_xenbus.c Sun Oct 07 23:17:52 2018 +0000
+++ b/sys/arch/xen/xen/xpci_xenbus.c Mon Oct 08 05:42:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xpci_xenbus.c,v 1.18 2018/08/19 01:33:26 riastradh Exp $ */
+/* $NetBSD: xpci_xenbus.c,v 1.19 2018/10/08 05:42:45 cherry Exp $ */
/*
* Copyright (c) 2009 Manuel Bouyer.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xpci_xenbus.c,v 1.18 2018/08/19 01:33:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xpci_xenbus.c,v 1.19 2018/10/08 05:42:45 cherry Exp $");
#include "opt_xen.h"
@@ -188,8 +188,9 @@
aprint_verbose_dev(sc->sc_dev, "using event channel %d\n",
sc->sc_evtchn);
#if 0
- event_set_handler(sc->sc_evtchn, &xpci_handler, sc,
- IPL_BIO, device_xname(sc->sc_dev));
+ intr_establish_xname(0, &xen_pic, pbxi->pbx_evtchn, IST_LEVEL,
+ IPL_BIO, &xpci_handler, sc, true,
+ device_xname(sc->sc_dev));
#endif
again:
Home |
Main Index |
Thread Index |
Old Index