Module Name:    src
Committed By:   riastradh
Date:           Sat Nov 11 07:52:42 UTC 2017

Modified Files:
        src/sys/arch/x86/x86: intr.c

Log Message:
Pass IPL through from intr_establish to event_set_handler.

Don't unconditionally use IPL_CLOCK, which aside from being the wrong
IPL for non-IPL_CLOCK interrupt handlers has the side effect of running
all interrupt handlers without the giant lock, even those that are not
MP-safe.

This is a step toward fixing:

https://mail-index.netbsd.org/tech-kern/2017/11/09/msg022571.html

ok cherry


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 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.107 src/sys/arch/x86/x86/intr.c:1.108
--- src/sys/arch/x86/x86/intr.c:1.107	Sat Nov 11 07:46:52 2017
+++ src/sys/arch/x86/x86/intr.c	Sat Nov 11 07:52:41 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.107 2017/11/11 07:46:52 riastradh Exp $	*/
+/*	$NetBSD: intr.c,v 1.108 2017/11/11 07:52:41 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.107 2017/11/11 07:46:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.108 2017/11/11 07:52:41 riastradh Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -1226,7 +1226,7 @@ intr_establish(int legacy_irq, struct pi
 	if (pic->pic_type == PIC_XEN) {
 		struct intrhand *rih;
 		event_set_handler(pin, handler,
-		    arg, IPL_CLOCK, "clock");
+		    arg, level, "XEN");
 
 		rih = kmem_zalloc(sizeof(struct intrhand),
 	    cold ? KM_NOSLEEP : KM_SLEEP);

Reply via email to