Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Apr 2006 04:07:08 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 94832 for review
Message-ID:  <200604090407.k394787n067205@repoman.freebsd.org>

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

Change 94832 by kmacy@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);						\



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