s390/crypto: fix compile error for ChaCha20 module

The clgfi instruction used within the ChaCha20 assembly is only
available for z9-109 and newer machines, and therefore this will
generate a compile error if compiled e.g. with MARCH_Z900.

Given that the assembler code will only be executed on machines with
vector instructions, which became much later available than z9-109,
use insn notation to generate the clgfi instruction, and avoid compile
errors due to unknown instructions.

Fixes: b087dfab4d ("s390/crypto: add SIMD implementation for ChaCha20")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
Heiko Carstens 2021-12-16 19:28:20 +01:00
parent 4c88bb96e4
commit 39d02827ed
1 changed files with 10 additions and 10 deletions

View File

@ -312,7 +312,7 @@ ENTRY(chacha20_vx_4x)
VPERM XC0,XC0,XC0,BEPERM
VPERM XD0,XD0,XD0,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_4x
VLM XT0,XT3,0,INP,0
@ -339,7 +339,7 @@ ENTRY(chacha20_vx_4x)
VPERM XC0,XC0,XC0,BEPERM
VPERM XD0,XD0,XD0,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_4x
VLM XT0,XT3,0,INP,0
@ -366,7 +366,7 @@ ENTRY(chacha20_vx_4x)
VPERM XC0,XC0,XC0,BEPERM
VPERM XD0,XD0,XD0,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_4x
VLM XT0,XT3,0,INP,0
@ -472,7 +472,7 @@ ENDPROC(chacha20_vx_4x)
#define T3 %v30
ENTRY(chacha20_vx)
clgfi LEN,256
.insn rilu,0xc20e00000000,LEN,256 # clgfi LEN,256
jle chacha20_vx_4x
stmg %r6,%r7,6*8(SP)
@ -725,7 +725,7 @@ ENTRY(chacha20_vx)
VPERM C0,C0,C0,BEPERM
VPERM D0,D0,D0,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_vx
VAF D2,D2,T2 # +K[3]+2
@ -754,7 +754,7 @@ ENTRY(chacha20_vx)
VPERM C0,C1,C1,BEPERM
VPERM D0,D1,D1,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_vx
VLM A1,D1,0,INP,0
@ -780,7 +780,7 @@ ENTRY(chacha20_vx)
VPERM C0,C2,C2,BEPERM
VPERM D0,D2,D2,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_vx
VLM A1,D1,0,INP,0
@ -807,7 +807,7 @@ ENTRY(chacha20_vx)
VPERM C0,C3,C3,BEPERM
VPERM D0,D3,D3,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_vx
VAF D3,D2,T1 # K[3]+4
@ -837,7 +837,7 @@ ENTRY(chacha20_vx)
VPERM C0,C4,C4,BEPERM
VPERM D0,D4,D4,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_vx
VLM A1,D1,0,INP,0
@ -864,7 +864,7 @@ ENTRY(chacha20_vx)
VPERM C0,C5,C5,BEPERM
VPERM D0,D5,D5,BEPERM
clgfi LEN,0x40
.insn rilu,0xc20e00000000,LEN,0x40 # clgfi LEN,0x40
jl .Ltail_vx
VLM A1,D1,0,INP,0