Change interrupt pending list end value to -1, to avoid linking an
interrupt handler twice. It may fix "sleep forever" bug.
This commit is contained in:
parent
388343e340
commit
1d66d17d9d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore.s,v 1.197 2004/04/09 19:41:57 petrov Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.198 2004/07/24 12:04:32 nakayama Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Eduardo Horvath
|
||||
|
@ -3984,7 +3984,7 @@ return_from_syscall:
|
|||
.data
|
||||
.globl intrpending
|
||||
intrpending:
|
||||
.space 16 * 8 * PTRSZ
|
||||
.space 16 * 8 * PTRSZ, -1
|
||||
|
||||
#ifdef DEBUG
|
||||
#define INTRDEBUG_VECTOR 0x1
|
||||
|
@ -4443,9 +4443,9 @@ sparc_intr_retry:
|
|||
1:
|
||||
membar #StoreLoad ! Make sure any failed casxa insns complete
|
||||
LDPTR [%l4], %l2 ! Check a slot
|
||||
brz,pn %l2, intrcmplt ! Empty list?
|
||||
|
||||
clr %l7
|
||||
cmp %l2, -1
|
||||
beq,pn CCCR, intrcmplt ! Empty list?
|
||||
mov -1, %l7
|
||||
membar #LoadStore
|
||||
CASPTR [%l4] ASI_N, %l2, %l7 ! Grab the entire list
|
||||
cmp %l7, %l2
|
||||
|
@ -4468,7 +4468,8 @@ sparc_intr_retry:
|
|||
stx %g0, [%l1] ! Clear intr source
|
||||
membar #Sync ! Should not be needed
|
||||
0:
|
||||
brnz,pn %l7, 2b ! 'Nother?
|
||||
cmp %l7, -1
|
||||
bne,pn CCCR, 2b ! 'Nother?
|
||||
mov %l7, %l2
|
||||
|
||||
#else /* INTRLIST */
|
||||
|
|
Loading…
Reference in New Issue