From 93f2be9ef072f63d88d43ae2cf238e6b65196176 Mon Sep 17 00:00:00 2001 From: fvdl Date: Wed, 4 Dec 2002 23:13:09 +0000 Subject: [PATCH] For the resume/recurse case, make sure that the interrupt mask level of the handler is set before acquiring the kernel lock, to avoid a recursive chain of interrupt processing out of splx(). --- sys/arch/i386/i386/vector.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arch/i386/i386/vector.S b/sys/arch/i386/i386/vector.S index b3a15ea0ae7e..bc30d286ff36 100644 --- a/sys/arch/i386/i386/vector.S +++ b/sys/arch/i386/i386/vector.S @@ -1,4 +1,4 @@ -/* $NetBSD: vector.S,v 1.3 2002/12/01 00:15:36 fvdl Exp $ */ +/* $NetBSD: vector.S,v 1.4 2002/12/04 23:13:09 fvdl Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -258,9 +258,9 @@ IDTVEC(recurse_/**/name/**/num) ;\ pushl $T_ASTFLT /* trap # for doing ASTs */ ;\ INTRENTRY ;\ IDTVEC(resume_/**/name/**/num) \ - movl CPUVAR(ISOURCES) + (num) * 4, %ebp ;\ - pushl %ebx ;\ movl %ebx,%esi ;\ + movl CPUVAR(ISOURCES) + (num) * 4, %ebp ;\ + movl IS_MAXLEVEL(%ebp),%ebx ;\ jmp 1f ;\ IDTVEC(intr_/**/name/**/num) ;\ pushl $0 /* dummy error code */ ;\ @@ -275,12 +275,12 @@ IDTVEC(intr_/**/name/**/num) ;\ movl CPUVAR(ILEVEL),%esi ;\ cmpl %ebx,%esi ;\ jae 10f /* currently masked; hold it */ ;\ - pushl %esi ;\ - movl %ebx,CPUVAR(ILEVEL) ;\ incl MY_COUNT+V_INTR /* statistical info */ ;\ addl $1,IS_EVCNTLO(%ebp) /* inc event counter */ ;\ adcl $0,IS_EVCNTHI(%ebp) ;\ 1: \ + pushl %esi ;\ + movl %ebx,CPUVAR(ILEVEL) ;\ sti ;\ incl CPUVAR(IDEPTH) ;\ movl IS_HANDLERS(%ebp),%ebx ;\