summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/cpu_mf.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/cpu_mf.h')
-rw-r--r--arch/s390/include/asm/cpu_mf.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/s390/include/asm/cpu_mf.h b/arch/s390/include/asm/cpu_mf.h
index bf2cbff926ef..53ba4f2ca296 100644
--- a/arch/s390/include/asm/cpu_mf.h
+++ b/arch/s390/include/asm/cpu_mf.h
@@ -12,6 +12,8 @@
#include <linux/errno.h>
#include <asm/facility.h>
+asm(".include \"asm/cpu_mf-insn.h\"\n");
+
#define CPU_MF_INT_SF_IAE (1 << 31) /* invalid entry address */
#define CPU_MF_INT_SF_ISE (1 << 30) /* incorrect SDBT entry */
#define CPU_MF_INT_SF_PRA (1 << 29) /* program request alert */
@@ -209,6 +211,21 @@ static inline int ecctr(u64 ctr, u64 *val)
return cc;
}
+/* Store CPU counter multiple for a particular counter set */
+static inline int stcctm(u8 set, u64 range, u64 *dest)
+{
+ int cc;
+
+ asm volatile (
+ " STCCTM %2,%3,%1\n"
+ " ipm %0\n"
+ " srl %0,28\n"
+ : "=d" (cc)
+ : "Q" (*dest), "d" (range), "i" (set)
+ : "cc", "memory");
+ return cc;
+}
+
/* Store CPU counter multiple for the MT utilization counter set */
static inline int stcctm5(u64 num, u64 *val)
{