summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2025-01-08 17:27:06 +0300
committerAlexander Gordeev <agordeev@linux.ibm.com>2025-01-13 11:50:18 +0300
commit061a5e4ac36dac35bb4dfd6a6054c5657b953881 (patch)
treeeedcb7220d31c0146bfe2acb68ab14e905f9fc92
parent4a0f62a3009be6515f5863970994a350a938ac52 (diff)
downloadlinux-061a5e4ac36dac35bb4dfd6a6054c5657b953881.tar.xz
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 <svens@linux.ibm.com> Reported-by: Jens Remus <jremus@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
-rw-r--r--arch/s390/include/asm/ebcdic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/ebcdic.h b/arch/s390/include/asm/ebcdic.h
index 7fdb6b92985a..7164cb658435 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)