Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2007 10:18:57 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 112981 for review
Message-ID:  <200701161018.l0GAIvIL081928@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112981

Change 112981 by piso@piso_newluxor on 2007/01/16 10:18:52

	Move spin lock acquisition for the callout path into the 
	interrupt scanning function, and add the callout_init() call
	that ought to be there.

Affected files ...

.. //depot/projects/soc2006/intr_filter/powerpc/powerpc/intr_machdep.c#26 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/powerpc/powerpc/intr_machdep.c#26 (text+ko) ====

@@ -123,6 +123,7 @@
 		panic("intr_init: unable to allocate interrupt handler array");
 
 	mtx_init(&ppc_intrs_lock, "intr table", NULL, MTX_SPIN);
+	callout_init(&stray_callout_handle, 1);
 
 	irq_enable = irq_e;
 
@@ -286,7 +287,9 @@
 
 	for (; i < ppc_nintrs; ) {
 		j = i++;
+		mtx_lock_spin(&ppc_intrs_lock);
 		intr = ppc_intrs[j];
+		mtx_unlock_spin(&ppc_intrs_lock);
 		if (intr != NULL && intr->event != NULL)
 			return (intr->event);
 	}
@@ -297,11 +300,9 @@
 void
 intr_callout_reset(void) 
 {
-
-	mtx_lock_spin(&ppc_intrs_lock);
+	
 	callout_reset(&stray_callout_handle, hz, &stray_detection, 
-	    &walk_intr_ppc);
-	mtx_unlock_spin(&ppc_intrs_lock);
+	    &walk_intr_ppc);	
 }
 
 void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701161018.l0GAIvIL081928>