Account ci_idepth in VR_INTR() and TX_INTR, rather than cpu_intr() in

hpcmips/interrupt.c. The latter one is used only on kernels configured for
multiple CPUs (i.e. kernels which have both options VR41XX and TX39XX).

Closes PR port-hpcmips/38139 from Risto Sainio.
This commit is contained in:
tsutsui 2008-04-04 12:36:06 +00:00
parent d9941582bf
commit 229f1dede1
3 changed files with 17 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: interrupt.c,v 1.11 2007/12/03 15:33:43 ad Exp $ */
/* $NetBSD: interrupt.c,v 1.12 2008/04/04 12:36:06 tsutsui Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.11 2007/12/03 15:33:43 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.12 2008/04/04 12:36:06 tsutsui Exp $");
#include "opt_vr41xx.h"
#include "opt_tx39xx.h"
@ -73,11 +73,7 @@ intr_init()
void
cpu_intr(u_int32_t status, u_int32_t cause, u_int32_t pc, u_int32_t ipending)
{
struct cpu_info *ci;
ci = curcpu();
ci->ci_idepth++;
(*platform.cpu_intr)(status, cause, pc, ipending);
ci->ci_idepth--;
}
#endif /* VR41XX && TX39XX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tx39icu.c,v 1.23 2007/12/03 15:33:44 ad Exp $ */
/* $NetBSD: tx39icu.c,v 1.24 2008/04/04 12:36:06 tsutsui Exp $ */
/*-
* Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tx39icu.c,v 1.23 2007/12/03 15:33:44 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: tx39icu.c,v 1.24 2008/04/04 12:36:06 tsutsui Exp $");
#include "opt_vr41xx.h"
#include "opt_tx39xx.h"
@ -315,9 +315,12 @@ TX_INTR(u_int32_t status, u_int32_t cause, u_int32_t pc, u_int32_t ipending)
{
struct tx39icu_softc *sc;
tx_chipset_tag_t tc;
struct cpu_info *ci;
txreg_t reg, pend, *regs;
int i, j;
ci = curcpu();
ci->ci_idepth++;
uvmexp.intrs++;
#ifdef __HAVE_FAST_SOFTINTS
@ -417,6 +420,9 @@ TX_INTR(u_int32_t status, u_int32_t cause, u_int32_t pc, u_int32_t ipending)
#ifdef __HAVE_FAST_SOFTINTS
softintr:
#endif
ci->ci_idepth--;
#ifdef __HAVE_FAST_SOFTINTS
_splset((status & ~cause & MIPS_HARD_INT_MASK) | MIPS_SR_INT_IE);
softintr(ipending);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vr.c,v 1.50 2008/01/04 22:13:57 ad Exp $ */
/* $NetBSD: vr.c,v 1.51 2008/04/04 12:36:06 tsutsui Exp $ */
/*-
* Copyright (c) 1999-2002
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vr.c,v 1.50 2008/01/04 22:13:57 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: vr.c,v 1.51 2008/04/04 12:36:06 tsutsui Exp $");
#include "opt_vr41xx.h"
#include "opt_tx39xx.h"
@ -532,6 +532,10 @@ vr_reboot(int howto, char *bootstr)
void
VR_INTR(u_int32_t status, u_int32_t cause, u_int32_t pc, u_int32_t ipending)
{
struct cpu_info *ci;
ci = curcpu();
ci->ci_idepth++;
uvmexp.intrs++;
/* Deal with unneded compare interrupts occasionally so that we can
@ -553,6 +557,7 @@ VR_INTR(u_int32_t status, u_int32_t cause, u_int32_t pc, u_int32_t ipending)
_splset(MIPS_INT_MASK_1|MIPS_SR_INT_IE);
(*vr_intr_handler[0])(vr_intr_arg[0], pc, status);
}
ci->ci_idepth--;
#ifdef __HAVE_FAST_SOFTINTS
if (ipending & MIPS_SOFT_INT_MASK_1) {