patch-2.1.19 linux/include/asm-sparc64/system.h
Next file: linux/include/asm-sparc64/termbits.h
Previous file: linux/include/asm-sparc64/svr4.h
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Mon Dec 30 12:00:03 1996
- Orig file:
v2.1.18/linux/include/asm-sparc64/system.h
- Orig date:
Wed Dec 18 15:59:02 1996
diff -u --recursive --new-file v2.1.18/linux/include/asm-sparc64/system.h linux/include/asm-sparc64/system.h
@@ -1,7 +1,10 @@
-/* $Id: system.h,v 1.2 1996/12/02 00:01:07 davem Exp $ */
+/* $Id: system.h,v 1.4 1996/12/28 18:39:56 davem Exp $ */
#ifndef __SPARC64_SYSTEM_H
#define __SPARC64_SYSTEM_H
+#include <asm/ptrace.h>
+#include <asm/processor.h>
+
#define setipl(__new_ipl) \
__asm__ __volatile__("wrpr %0, %%pil" : : "r" (__new_ipl) : "memory")
@@ -43,6 +46,28 @@
#define membar(type) __asm__ __volatile__ ("membar " type : : : "memory");
+#define flushi(addr) __asm__ __volatile__ ("flush %0" : : "r" (addr))
+
+#define flushw_all() __asm__ __volatile__("flushw")
+
+#ifndef __ASSEMBLY__
+
+extern __inline__ void flushw_user(void)
+{
+ __asm__ __volatile__("
+ rdpr %%otherwin, %%g1
+1:
+ rdpr %%otherwin, %%g2
+ brnz,pn %%g2, 1b
+ save %%sp, %0, %%sp
+1:
+ subcc %%g1, 1, %%g1
+ bne,pn %%xcc, 1b
+ restore %%g0, %%g0, %%g0
+ " : : "i" (-REGWIN_SZ)
+ : "g1", "g2");
+}
+
/* Unlike the hybrid v7/v8 kernel, we can assume swap exists under V9. */
extern __inline__ unsigned long xchg_u32(__volatile__ unsigned int *m, unsigned int val)
{
@@ -86,5 +111,7 @@
__xchg_called_with_bad_pointer();
return x;
}
+
+#endif /* !(__ASSEMBLY__) */
#endif /* !(__SPARC64_SYSTEM_H) */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov