From b112a2df28e6b5238ae4e68821ddd706a476d28c Mon Sep 17 00:00:00 2001 From: "Jason J. Herne" Date: Tue, 21 Feb 2017 09:00:54 -0500 Subject: s390/cpacf: query instructions use unique parameters for compatibility with KMA The new KMA instruction requires unique parameters. Update __cpacf_query to generate a compatible assembler instruction. Signed-off-by: Jason J. Herne Acked-by: Harald Freudenberger Signed-off-by: Christian Borntraeger --- arch/s390/include/asm/cpacf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/s390/include/asm/cpacf.h') diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h index e2dfbf280d12..175a5d773306 100644 --- a/arch/s390/include/asm/cpacf.h +++ b/arch/s390/include/asm/cpacf.h @@ -149,8 +149,8 @@ static inline void __cpacf_query(unsigned int opcode, cpacf_mask_t *mask) asm volatile( " spm 0\n" /* pckmo doesn't change the cc */ - /* Parameter registers are ignored, but may not be 0 */ - "0: .insn rrf,%[opc] << 16,2,2,2,0\n" + /* Parameter regs are ignored, but must be nonzero and unique */ + "0: .insn rrf,%[opc] << 16,2,4,6,0\n" " brc 1,0b\n" /* handle partial completion */ : "=m" (*mask) : [fc] "d" (r0), [pba] "a" (r1), [opc] "i" (opcode) -- cgit v1.2.3-59-g8ed1b From 152c1c8d60ebedce8cc912c12f9be9ceca6c6671 Mon Sep 17 00:00:00 2001 From: "Jason J. Herne" Date: Thu, 2 Feb 2017 08:25:19 -0500 Subject: s390/cpacf: Introduce kma instruction Provide a kma instruction definition for use by callers of __cpacf_query. Signed-off-by: Jason J. Herne Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger --- arch/s390/include/asm/cpacf.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/s390/include/asm/cpacf.h') diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h index 175a5d773306..31cac7d17b48 100644 --- a/arch/s390/include/asm/cpacf.h +++ b/arch/s390/include/asm/cpacf.h @@ -26,6 +26,7 @@ #define CPACF_PCC 0xb92c /* MSA4 */ #define CPACF_KMCTR 0xb92d /* MSA4 */ #define CPACF_PPNO 0xb93c /* MSA5 */ +#define CPACF_KMA 0xb929 /* MSA8 */ /* * En/decryption modifier bits -- cgit v1.2.3-59-g8ed1b