Module Name: src Committed By: cliff Date: Sat Feb 6 03:10:14 UTC 2010
Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_intr.c Log Message: - when establishing an intr, if malloc fails, be sure to splx on the way out - in interrupt dispatch, when ack-ing EIRR, preserve the softint bits To generate a diff of this commit: cvs rdiff -u -r1.1.2.9 -r1.1.2.10 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.9 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.10 --- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.9 Sat Feb 6 02:59:04 2010 +++ src/sys/arch/mips/rmi/rmixl_intr.c Sat Feb 6 03:10:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixl_intr.c,v 1.1.2.9 2010/02/06 02:59:04 matt Exp $ */ +/* $NetBSD: rmixl_intr.c,v 1.1.2.10 2010/02/06 03:10:14 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.9 2010/02/06 02:59:04 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.10 2010/02/06 03:10:14 cliff Exp $"); #include "opt_ddb.h" @@ -583,7 +583,7 @@ */ ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT); if (ih == NULL) - return NULL; + goto out; ih->ih_func = func; ih->ih_arg = arg; @@ -606,6 +606,7 @@ */ rmixl_intr_irt_establish(irq, ipl, trigger, polarity, vec); + out: splx(s); return ih; @@ -672,7 +673,9 @@ ivp = &rmixl_intrvec[vec]; - eirr = 1ULL << vec; + asm volatile("dmfc0 %0, $9, 6;" : "=r"(eirr)); + eirr &= 3; + eirr |= 1ULL << vec; asm volatile("dmtc0 %0, $9, 6;" :: "r"(eirr)); #ifdef IOINTR_DEBUG