Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amiga/amiga PR port-amiga/55233 Process hangs indef...



details:   https://anonhg.NetBSD.org/src/rev/5549abc91239
branches:  trunk
changeset: 932357:5549abc91239
user:      ad <ad%NetBSD.org@localhost>
date:      Tue May 05 21:22:48 2020 +0000

description:
PR port-amiga/55233 Process hangs indefinitely if not calling syscalls for a while

cpu_intr_p() is broken on amiga, fix it.

>From code inspection it looks like amiga and other m68k ports check for ASTs
with interrupts enabled in some cases, which is racy.  Not fixed.

diffstat:

 sys/arch/amiga/amiga/machdep.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r 1d5f824284d4 -r 5549abc91239 sys/arch/amiga/amiga/machdep.c
--- a/sys/arch/amiga/amiga/machdep.c    Tue May 05 20:47:38 2020 +0000
+++ b/sys/arch/amiga/amiga/machdep.c    Tue May 05 21:22:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.251 2019/02/24 19:24:20 jandberg Exp $   */
+/*     $NetBSD: machdep.c,v 1.252 2020/05/05 21:22:48 ad Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@
 #include "empm.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.251 2019/02/24 19:24:20 jandberg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252 2020/05/05 21:22:48 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -986,8 +986,6 @@
        }
 }
 
-static int idepth;
-
 void
 intrhand(int sr)
 {
@@ -995,7 +993,6 @@
        register unsigned short ireq;
        register struct isr **p, *q;
 
-       idepth++;
        ipl = (sr >> 8) & 7;
 #ifdef REALLYDEBUG
        printf("intrhand: got int. %d\n", ipl);
@@ -1118,14 +1115,13 @@
 #ifdef REALLYDEBUG
        printf("intrhand: leaving.\n");
 #endif
-       idepth--;
 }
 
 bool
 cpu_intr_p(void)
 {
 
-       return idepth != 0;
+       return interrupt_depth != 0;
 }
 
 #if defined(DEBUG) && !defined(PANICBUTTON)



Home | Main Index | Thread Index | Old Index