patch-2.1.132 linux/include/asm-alpha/system.h

Next file: linux/include/asm-alpha/termios.h
Previous file: linux/include/asm-alpha/irq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/include/asm-alpha/system.h linux/include/asm-alpha/system.h
@@ -116,6 +116,24 @@
 #define draina() \
 __asm__ __volatile__ ("call_pal %0 #draina" : : "i" (PAL_draina) : "memory")
 
+
+static inline unsigned long 
+wrperfmon(unsigned long perf_fun, unsigned long arg)
+{
+          register unsigned long __r0 __asm__("$0");
+	  register unsigned long __r16 __asm__("$16");
+	  register unsigned long __r17 __asm__("$17");
+	  __r16 = perf_fun;
+	  __r17 = arg;
+	  __asm__ __volatile__(
+		  "call_pal %1"
+		  : "=r"(__r0)
+		  : "i"(PAL_wrperfmon), "r"(__r16), "r"(__r17)
+		  : "$1", "$22", "$23", "$24", "$25", "$26");
+	  return __r0;
+}
+
+
 #define call_pal1(palno,arg)						\
 ({									\
 	register unsigned long __r0 __asm__("$0");			\

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov