From 57e395fd49662ebf7f59b7563177501cae1f913a Mon Sep 17 00:00:00 2001 From: tsutsui Date: Mon, 28 Jan 2008 16:21:19 +0000 Subject: [PATCH] - account idepth in a clock interrupt handler too - use idepth for CLKF_INTR() --- sys/arch/hp300/hp300/locore.s | 4 +++- sys/arch/hp300/include/cpu.h | 5 +++-- sys/arch/hp300/include/intr.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s index df4d7b7be51e..b6570bb81a3c 100644 --- a/sys/arch/hp300/hp300/locore.s +++ b/sys/arch/hp300/hp300/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.142 2008/01/07 16:55:15 joerg Exp $ */ +/* $NetBSD: locore.s,v 1.143 2008/01/28 16:21:19 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -1071,6 +1071,7 @@ ENTRY_NOPROFILE(intrhand) /* levels 1 through 5 */ ENTRY_NOPROFILE(lev6intr) /* level 6: clock */ INTERRUPT_SAVEREG + addql #1,_C_LABEL(idepth) | entering interrupt CLKADDR(%a0) movb %a0@(CLKSR),%d0 | read clock status Lclkagain: @@ -1132,6 +1133,7 @@ Lrecheck: addql #1,_C_LABEL(uvmexp)+UVMEXP_INTRS | chalk up another interrupt movb %a0@(CLKSR),%d0 | see if anything happened jmi Lclkagain | while we were in hardclock/statintr + subql #1,_C_LABEL(idepth) | exiting from interrupt INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) | all done diff --git a/sys/arch/hp300/include/cpu.h b/sys/arch/hp300/include/cpu.h index d42975f5239c..8f38bad55f8c 100644 --- a/sys/arch/hp300/include/cpu.h +++ b/sys/arch/hp300/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.57 2007/10/17 19:54:25 garbled Exp $ */ +/* $NetBSD: cpu.h,v 1.58 2008/01/28 16:21:20 tsutsui Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -141,7 +141,8 @@ struct clockframe { #define CLKF_INTR(framep) (((framep)->sr & PSL_M) == 0) #else /* but until we start using PSL_M, we have to do this instead */ -#define CLKF_INTR(framep) (0) /* XXX */ +#include +#define CLKF_INTR(framep) (idepth > 1) /* XXX */ #endif diff --git a/sys/arch/hp300/include/intr.h b/sys/arch/hp300/include/intr.h index cbc3bc6b823b..dcc89cd04fa6 100644 --- a/sys/arch/hp300/include/intr.h +++ b/sys/arch/hp300/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.26 2007/12/03 15:33:39 ad Exp $ */ +/* $NetBSD: intr.h,v 1.27 2008/01/28 16:21:20 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997, 1999 The NetBSD Foundation, Inc. @@ -69,6 +69,7 @@ #define PSLTOIPL(x) (((x) >> 8) & 0xf) #define IPLTOPSL(x) ((((x) & 0xf) << 8) | PSL_S) +extern int idepth; extern u_short hp300_ipl2psl[]; typedef int ipl_t;