Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Pass IPL through from intr_establish to eve...



details:   https://anonhg.NetBSD.org/src/rev/9105ca0255db
branches:  trunk
changeset: 827744:9105ca0255db
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Nov 11 07:52:41 2017 +0000

description:
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

diffstat:

 sys/arch/x86/x86/intr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 555578b5f433 -r 9105ca0255db sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Sat Nov 11 07:49:43 2017 +0000
+++ b/sys/arch/x86/x86/intr.c   Sat Nov 11 07:52:41 2017 +0000
@@ -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 @@
        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);



Home | Main Index | Thread Index | Old Index