Skip to content

Commit 061a5e4

Browse files
svens-s390Alexander Gordeev
authored andcommitted
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 <[email protected]> Reported-by: Jens Remus <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 4a0f62a commit 061a5e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/include/asm/ebcdic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ codepage_convert(const __u8 *codepage, volatile char *addr, unsigned long nr)
2929
"0: tr 0(1,%0),0(%2)\n"
3030
"1: tr 0(256,%0),0(%2)\n"
3131
" la %0,256(%0)\n"
32-
"2: ahi %1,-256\n"
32+
"2: aghi %1,-256\n"
3333
" jnm 1b\n"
3434
" exrl %1,0b"
3535
: "+&a" (addr), "+&a" (nr)

0 commit comments

Comments
 (0)