NetBSD-Bugs archive

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

Re: port-hpcmips/38139: hpcmips 4.99.55: mutex_vector_enter: locking against myself



The following reply was made to PR port-hpcmips/38139; it has been noted by 
GNATS.

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: port-hpcmips-maintainer%NetBSD.org@localhost, 
gnats-admin%NetBSD.org@localhost,
        netbsd-bugs%NetBSD.org@localhost, tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-hpcmips/38139: hpcmips 4.99.55: mutex_vector_enter: locking
         against myself
Date: Sun, 23 Mar 2008 03:04:57 +0900

 > >Synopsis:       hpcmips 4.99.55: mutex_vector_enter: locking against myself
 
 Try the attached patch.
 ---
 Izumi Tsutsui
 
 
 Index: hpcmips/interrupt.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/hpcmips/hpcmips/interrupt.c,v
 retrieving revision 1.11
 diff -u -r1.11 interrupt.c
 --- hpcmips/interrupt.c        3 Dec 2007 15:33:43 -0000       1.11
 +++ hpcmips/interrupt.c        22 Mar 2008 17:58:15 -0000
 @@ -73,11 +73,7 @@
  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 */
 Index: tx/tx39icu.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/hpcmips/tx/tx39icu.c,v
 retrieving revision 1.23
 diff -u -r1.23 tx39icu.c
 --- tx/tx39icu.c       3 Dec 2007 15:33:44 -0000       1.23
 +++ tx/tx39icu.c       22 Mar 2008 17:58:15 -0000
 @@ -315,9 +315,12 @@
  {
        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 @@
  
  #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
 Index: vr/vr.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/hpcmips/vr/vr.c,v
 retrieving revision 1.50
 diff -u -r1.50 vr.c
 --- vr/vr.c    4 Jan 2008 22:13:57 -0000       1.50
 +++ vr/vr.c    22 Mar 2008 17:58:15 -0000
 @@ -532,6 +532,10 @@
  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 @@
                _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) {
 


Home | Main Index | Thread Index | Old Index