Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen remove restriction on interrupt level for MP-sa...
details: https://anonhg.NetBSD.org/src/rev/4ccfb10f19dd
branches: trunk
changeset: 1008950:4ccfb10f19dd
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Apr 06 18:02:33 2020 +0000
description:
remove restriction on interrupt level for MP-safe interrupt handlers
diffstat:
sys/arch/xen/include/evtchn.h | 4 ++--
sys/arch/xen/x86/xen_intr.c | 14 ++++----------
sys/arch/xen/xen/evtchn.c | 9 +++------
3 files changed, 9 insertions(+), 18 deletions(-)
diffs (91 lines):
diff -r e96d5f612a7d -r 4ccfb10f19dd sys/arch/xen/include/evtchn.h
--- a/sys/arch/xen/include/evtchn.h Mon Apr 06 17:55:51 2020 +0000
+++ b/sys/arch/xen/include/evtchn.h Mon Apr 06 18:02:33 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: evtchn.h,v 1.26 2018/06/24 13:35:32 jdolecek Exp $ */
+/* $NetBSD: evtchn.h,v 1.27 2020/04/06 18:02:33 jdolecek Exp $ */
/*
*
@@ -42,7 +42,7 @@
void call_evtchn_do_event(int, struct intrframe *);
void call_xenevt_event(int);
int event_set_handler(int, int (*func)(void *), void *, int, const char *,
- const char *);
+ const char *, bool);
int event_remove_handler(int, int (*func)(void *), void *);
struct cpu_info;
diff -r e96d5f612a7d -r 4ccfb10f19dd sys/arch/xen/x86/xen_intr.c
--- a/sys/arch/xen/x86/xen_intr.c Mon Apr 06 17:55:51 2020 +0000
+++ b/sys/arch/xen/x86/xen_intr.c Mon Apr 06 18:02:33 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_intr.c,v 1.19 2020/04/03 22:20:36 ad Exp $ */
+/* $NetBSD: xen_intr.c,v 1.20 2020/04/06 18:02:33 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.19 2020/04/03 22:20:36 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v 1.20 2020/04/06 18:02:33 jdolecek Exp $");
#include "opt_multiprocessor.h"
@@ -166,17 +166,11 @@
if (pic->pic_type == PIC_XEN) {
struct intrhand *rih;
- /*
- * event_set_handler interprets `level != IPL_VM' to
- * mean MP-safe, so we require the caller to match that
- * for the moment.
- */
- KASSERT(known_mpsafe == (level != IPL_VM));
-
intrstr = intr_create_intrid(legacy_irq, pic, pin, intrstr_buf,
sizeof(intrstr_buf));
- event_set_handler(pin, handler, arg, level, intrstr, xname);
+ event_set_handler(pin, handler, arg, level, intrstr, xname,
+ known_mpsafe);
rih = kmem_zalloc(sizeof(*rih), cold ? KM_NOSLEEP : KM_SLEEP);
if (rih == NULL) {
diff -r e96d5f612a7d -r 4ccfb10f19dd sys/arch/xen/xen/evtchn.c
--- a/sys/arch/xen/xen/evtchn.c Mon Apr 06 17:55:51 2020 +0000
+++ b/sys/arch/xen/xen/evtchn.c Mon Apr 06 18:02:33 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: evtchn.c,v 1.86 2019/05/09 17:09:51 bouyer Exp $ */
+/* $NetBSD: evtchn.c,v 1.87 2020/04/06 18:02:33 jdolecek Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -54,7 +54,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.86 2019/05/09 17:09:51 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.87 2020/04/06 18:02:33 jdolecek Exp $");
#include "opt_xen.h"
#include "isa.h"
@@ -834,15 +834,12 @@
int
event_set_handler(int evtch, int (*func)(void *), void *arg, int level,
- const char *intrname, const char *xname)
+ const char *intrname, const char *xname, bool mpsafe)
{
struct cpu_info *ci = curcpu(); /* XXX: pass in ci ? */
struct evtsource *evts;
struct intrhand *ih, **ihp;
int s;
-#ifdef MULTIPROCESSOR
- bool mpsafe = (level != IPL_VM);
-#endif /* MULTIPROCESSOR */
#ifdef IRQ_DEBUG
printf("event_set_handler IRQ %d handler %p\n", evtch, func);
Home |
Main Index |
Thread Index |
Old Index