Module Name: src
Committed By: cliff
Date: Mon Sep 20 19:41:06 UTC 2010
Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_intr.c
Log Message:
- rmixl_intrhand_t is valid only if ih_func is non-NULL;
set valid at end of rmixl_vec_establish and
set invalid at start of rmixl_vec_disestablish
to allow lockless check if valid in dispatch.
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/sys/arch/mips/rmi/rmixl_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/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.23 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.24
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.23 Thu Aug 26 20:09:33 2010
+++ src/sys/arch/mips/rmi/rmixl_intr.c Mon Sep 20 19:41:05 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixl_intr.c,v 1.1.2.23 2010/08/26 20:09:33 rmind Exp $ */
+/* $NetBSD: rmixl_intr.c,v 1.1.2.24 2010/09/20 19:41:05 cliff Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.23 2010/08/26 20:09:33 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.24 2010/09/20 19:41:05 cliff Exp $");
#include "opt_ddb.h"
#define __INTR_PRIVATE
@@ -726,7 +726,6 @@
return NULL;
}
- ih->ih_func = func;
ih->ih_arg = arg;
ih->ih_mpsafe = mpsafe;
ih->ih_vec = vec;
@@ -739,6 +738,8 @@
ipl_eimr_map[i] |= eimr_bit;
}
+ ih->ih_func = func; /* do this last */
+
splx(s);
return ih;
@@ -805,7 +806,7 @@
s = splhigh();
- ih->ih_func = NULL;
+ ih->ih_func = NULL; /* do this first */
eimr_bit = (uint64_t)1 << ih->ih_vec;
for (int i=ih->ih_ipl; --i >= 0; ) {