PERFORCE change 94832 for review

Kip Macy kmacy at FreeBSD.org
Sun Apr 9 04:07:09 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=94832

Change 94832 by kmacy at kmacy_storage:sun4v_rwbuf on 2006/04/09 04:06:40

	add intr_restore_all, intr_disable_all

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/cpufunc.h#7 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/cpufunc.h#7 (text+ko) ====

@@ -207,7 +207,7 @@
 }
 
 static __inline register_t
-intr_disable(void)
+intr_disable_all(void)
 {
 	u_long s;
 
@@ -215,7 +215,19 @@
 	wrpr(pstate, s & ~PSTATE_IE, 0);
 	return (s);
 }
-#define	intr_restore(s)	wrpr(pstate, (s), 0)
+#define	intr_restore_all(s)	wrpr(pstate, (s), 0)
+
+static __inline register_t
+intr_disable(void)
+{
+	u_long s;
+
+	s = rdpr(pil);
+	wrpr(pil, 14, 0);
+	return (s);
+}
+#define	intr_restore(s)	wrpr(pil, (s), 0)
+
 
 /*
  * In some places, it is required that the store is directly followed by a
@@ -224,7 +236,7 @@
  */
 #define	stxa_sync(va, asi, val) do {					\
 	u_long s;							\
-	s = intr_disable();						\
+	s = intr_disable_all();						\
 	__asm __volatile("stxa %0, [%1] %2; membar #Sync"		\
 	    : : "r" (val), "r" (va), "n" (asi));			\
 	intr_restore(s);						\


More information about the p4-projects mailing list