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.
This commit is contained in:
parent
e9dae938b7
commit
18953a5818
@ -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 @@ xen_ipi_init(void)
|
||||
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 */
|
||||
|
@ -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 @@ xen_resumeclocks(struct cpu_info *ci)
|
||||
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)
|
||||
|
@ -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 @@ xennet_xenbus_resume(device_t dev, const pmf_qual_t *qual)
|
||||
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;
|
||||
|
@ -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 @@ pciback_xenbus_frontend_changed(void *arg, XenbusState new_state)
|
||||
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);
|
||||
|
@ -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 @@ xbd_xenbus_resume(device_t dev, const pmf_qual_t *qual)
|
||||
|
||||
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);
|
||||
|
||||
|
@ -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 @@ xbdback_connect(struct xbdback_instance *xbdi)
|
||||
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);
|
||||
|
@ -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 @@ xencons_resume(device_t dev, const pmf_qual_t *qual) {
|
||||
/* 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 @@ xencons_resume(device_t dev, const pmf_qual_t *qual) {
|
||||
}
|
||||
} 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);
|
||||
|
@ -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 @@ xenevtattach(int n)
|
||||
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);
|
||||
|
@ -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 @@ xennetback_connect(struct xnetback_instance *xneti)
|
||||
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);
|
||||
|
@ -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 @@ xpci_xenbus_resume(void *p)
|
||||
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
|
||||
|
@ -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>
|
||||
#include <sys/null.h>
|
||||
@ -221,7 +221,7 @@ xb_init_comms(device_t dev)
|
||||
|
||||
evtchn = xen_start_info.store_evtchn;
|
||||
|
||||
ih = intr_establish_xname(0, &xen_pic, evtchn, IST_LEVEL, IPL_TTY,
|
||||
ih = intr_establish_xname(-1, &xen_pic, evtchn, IST_LEVEL, IPL_TTY,
|
||||
wake_waiting, NULL, false, device_xname(dev));
|
||||
|
||||
hypervisor_enable_event(evtchn);
|
||||
|
Loading…
Reference in New Issue
Block a user