From: Sven Schnelle Date: Wed, 8 Jan 2025 14:27:06 +0000 (+0100) Subject: s390/ebcdic: Fix length decrement in codepage_convert() X-Git-Tag: v6.14-rc1~200^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=061a5e4ac36dac35bb4dfd6a6054c5657b953881;p=thirdparty%2Fkernel%2Flinux.git s390/ebcdic: Fix length decrement in codepage_convert() The inline assembly uses the ahi instruction to decrement and test whether more than 256 bytes are left for conversion. But the nr variable passed is of type unsigned long. Therefore use aghi. Signed-off-by: Sven Schnelle Reported-by: Jens Remus Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev --- diff --git a/arch/s390/include/asm/ebcdic.h b/arch/s390/include/asm/ebcdic.h index 7fdb6b92985a9..7164cb6584355 100644 --- a/arch/s390/include/asm/ebcdic.h +++ b/arch/s390/include/asm/ebcdic.h @@ -29,7 +29,7 @@ codepage_convert(const __u8 *codepage, volatile char *addr, unsigned long nr) "0: tr 0(1,%0),0(%2)\n" "1: tr 0(256,%0),0(%2)\n" " la %0,256(%0)\n" - "2: ahi %1,-256\n" + "2: aghi %1,-256\n" " jnm 1b\n" " exrl %1,0b" : "+&a" (addr), "+&a" (nr)