Module Name:    src
Committed By:   cliff
Date:           Sat Feb  5 06:11:16 UTC 2011

Modified Files:
        src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_fmn.c

Log Message:
- obtain rmixl_intr_lock before rmixl_vec_establish(),
he expects that lock is held


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/mips/rmi/rmixl_fmn.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_fmn.c
diff -u src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.4 src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.5
--- src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.4	Tue Apr 13 18:15:16 2010
+++ src/sys/arch/mips/rmi/rmixl_fmn.c	Sat Feb  5 06:11:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_fmn.c,v 1.1.2.4 2010/04/13 18:15:16 cliff Exp $	*/
+/*	$NetBSD: rmixl_fmn.c,v 1.1.2.5 2011/02/05 06:11:16 cliff Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -644,10 +644,15 @@
 	/*
 	 * establish dispatcher for FMN interrupt
 	 */
-	void *ih = rmixl_vec_establish(RMIXL_INTRVEC_FMN, -1, RMIXL_FMN_INTR_IPL,
+	extern kmutex_t rmixl_intr_lock;
+	void *ih;
+
+	mutex_enter(&rmixl_intr_lock);
+	ih = rmixl_vec_establish(RMIXL_INTRVEC_FMN, -1, RMIXL_FMN_INTR_IPL,
 		rmixl_fmn_intr_dispatch, fmnp, "fmn");
 	if (ih == NULL)
 		panic("%s: rmixl_vec_establish failed", __func__);
+	mutex_exit(&rmixl_intr_lock);
 	fmnp->fmn_ih = ih;
 #endif
 

Reply via email to