s390/cpacf: query instructions use unique parameters for compatibility with KMA
authorJason J. Herne <jjherne@linux.vnet.ibm.com>
Tue, 21 Feb 2017 14:00:54 +0000 (09:00 -0500)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 26 Apr 2017 12:15:39 +0000 (14:15 +0200)
The new KMA instruction requires unique parameters. Update __cpacf_query to
generate a compatible assembler instruction.

Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Acked-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/cpacf.h

index e2dfbf280d124aefefb6e82247820c23d8268c74..175a5d77330695ad2d854cd703733f67558eed12 100644 (file)
@@ -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)