add known_mpsafe parameter also to pirq_establish(), and pass the parameter

to underlying event_set_handler()
This commit is contained in:
jdolecek 2020-04-06 19:26:00 +00:00
parent 2cd88f170e
commit 104eb04d61
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: evtchn.h,v 1.27 2020/04/06 18:02:33 jdolecek Exp $ */
/* $NetBSD: evtchn.h,v 1.28 2020/04/06 19:26:00 jdolecek Exp $ */
/*
*
@ -70,7 +70,7 @@ struct pintrhand {
};
struct pintrhand *pirq_establish(int, int, int (*)(void *), void *, int,
const char *, const char *);
const char *, const char *, bool);
void pirq_disestablish(struct pintrhand *);
#endif /* _XEN_EVENTS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: xen_intr.c,v 1.20 2020/04/06 18:02:33 jdolecek Exp $ */
/* $NetBSD: xen_intr.c,v 1.21 2020/04/06 19:26:00 jdolecek Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v 1.20 2020/04/06 18:02:33 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v 1.21 2020/04/06 19:26:00 jdolecek Exp $");
#include "opt_multiprocessor.h"
@ -231,7 +231,7 @@ xen_intr_establish_xname(int legacy_irq, struct pic *pic, int pin,
}
pih = pirq_establish(gsi, evtchn, handler, arg, level,
intrstr, xname);
intrstr, xname, known_mpsafe);
pih->pic_type = pic->pic_type;
return pih;
#endif /* NPCI > 0 || NISA > 0 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: evtchn.c,v 1.87 2020/04/06 18:02:33 jdolecek Exp $ */
/* $NetBSD: evtchn.c,v 1.88 2020/04/06 19:26:00 jdolecek Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@ -54,7 +54,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.87 2020/04/06 18:02:33 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.88 2020/04/06 19:26:00 jdolecek Exp $");
#include "opt_xen.h"
#include "isa.h"
@ -745,7 +745,7 @@ unbind_pirq_from_evtch(int pirq)
struct pintrhand *
pirq_establish(int pirq, int evtch, int (*func)(void *), void *arg, int level,
const char *intrname, const char *xname)
const char *intrname, const char *xname, bool known_mpsafe)
{
struct pintrhand *ih;
@ -764,7 +764,7 @@ pirq_establish(int pirq, int evtch, int (*func)(void *), void *arg, int level,
ih->arg = arg;
if (event_set_handler(evtch, pirq_interrupt, ih, level, intrname,
xname) != 0) {
xname, known_mpsafe) != 0) {
kmem_free(ih, sizeof(struct pintrhand));
return NULL;
}