aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/cpu_mf-insn.h
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.ibm.com>2018-08-29 17:46:06 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-02-22 09:19:52 +0100
commit778fb10ccc18b16c022be898d8497767c20ea7b5 (patch)
treef2d132f5f24d47f22be234d797ff46dd40c12b12 /arch/s390/include/asm/cpu_mf-insn.h
parents390/cpum_cf: Add minimal in-kernel interface for counter measurements (diff)
downloadlinux-dev-778fb10ccc18b16c022be898d8497767c20ea7b5.tar.xz
linux-dev-778fb10ccc18b16c022be898d8497767c20ea7b5.zip
s390/cpu_mf: add store cpu counter multiple instruction support
Add support for the STORE CPU COUNTER MULTIPLE instruction to extract a range of counters from a counter set. An assembler macro is used to create the instruction opcode because the counter set identifier is part of the instruction and, thus, cannot be easily specified as parameter. Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/cpu_mf-insn.h')
-rw-r--r--arch/s390/include/asm/cpu_mf-insn.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/s390/include/asm/cpu_mf-insn.h b/arch/s390/include/asm/cpu_mf-insn.h
new file mode 100644
index 000000000000..a68b362e0964
--- /dev/null
+++ b/arch/s390/include/asm/cpu_mf-insn.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Support for CPU-MF instructions
+ *
+ * Copyright IBM Corp. 2019
+ * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
+ */
+#ifndef _ASM_S390_CPU_MF_INSN_H
+#define _ASM_S390_CPU_MF_INSN_H
+
+#ifdef __ASSEMBLY__
+
+/* Macro to generate the STCCTM instruction with a customized
+ * M3 field designating the counter set.
+ */
+.macro STCCTM r1 m3 db2
+ .insn rsy,0xeb0000000017,\r1,\m3 & 0xf,\db2
+.endm
+
+#endif /* __ASSEMBLY__ */
+
+#endif