Module Name: src Committed By: riastradh Date: Sat Nov 11 21:05:58 UTC 2017
Modified Files: src/sys/arch/x86/x86: intr.c Log Message: Add KASSERT to confirm no change in xen intr MP-safety annotations. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/arch/x86/x86/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.111 src/sys/arch/x86/x86/intr.c:1.112 --- src/sys/arch/x86/x86/intr.c:1.111 Sat Nov 11 19:25:29 2017 +++ src/sys/arch/x86/x86/intr.c Sat Nov 11 21:05:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.111 2017/11/11 19:25:29 riastradh Exp $ */ +/* $NetBSD: intr.c,v 1.112 2017/11/11 21:05:58 riastradh Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.111 2017/11/11 19:25:29 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.112 2017/11/11 21:05:58 riastradh Exp $"); #include "opt_intrdebug.h" #include "opt_multiprocessor.h" @@ -1226,6 +1226,13 @@ intr_establish_xname(int legacy_irq, str 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)); + event_set_handler(pin, handler, arg, level, xname); rih = kmem_zalloc(sizeof(*rih), cold ? KM_NOSLEEP : KM_SLEEP);