Port-sparc64 archive

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

Re: PCU panic on V240



On Thu, Dec 05, 2013 at 08:00:06AM -0800, Matt Thomas wrote:
> cpu_softintr_p() is for softintrs
> cpu_intr_p() is for hardintrs.

Ah yes, and we get it right.
A kernel with attached patch does not fire any KASSERTs for me.

Martin
Index: kern/kern_timeout.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_timeout.c,v
retrieving revision 1.47
diff -u -r1.47 kern_timeout.c
--- kern/kern_timeout.c 14 Sep 2013 20:53:48 -0000      1.47
+++ kern/kern_timeout.c 5 Dec 2013 16:37:38 -0000
@@ -697,6 +697,9 @@
        int mpsafe, count, ticks, delta;
        lwp_t *l;
 
+       KASSERT(cpu_softintr_p());
+       KASSERT(!cpu_intr_p());
+
        l = curlwp;
        KASSERT(l->l_cpu == curcpu());
        cc = l->l_cpu->ci_data.cpu_callout;
Index: dev/pci/if_bge.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_bge.c,v
retrieving revision 1.264
diff -u -r1.264 if_bge.c
--- dev/pci/if_bge.c    7 Nov 2013 18:45:32 -0000       1.264
+++ dev/pci/if_bge.c    5 Dec 2013 16:37:39 -0000
@@ -84,6 +84,7 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/callout.h>
+#include <sys/cpu.h>
 #include <sys/sockio.h>
 #include <sys/mbuf.h>
 #include <sys/malloc.h>
@@ -4570,6 +4571,8 @@
        uint32_t statusword;
        uint32_t intrmask = BGE_PCISTATE_INTR_NOT_ACTIVE;
 
+       KASSERT(cpu_intr_p());
+
        sc = xsc;
        ifp = &sc->ethercom.ec_if;
 


Home | Main Index | Thread Index | Old Index