Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sven Schnelle and committed by
Alexander Gordeev
061a5e4a 4a0f62a3

+1 -1
+1 -1
arch/s390/include/asm/ebcdic.h
··· 29 29 "0: tr 0(1,%0),0(%2)\n" 30 30 "1: tr 0(256,%0),0(%2)\n" 31 31 " la %0,256(%0)\n" 32 - "2: ahi %1,-256\n" 32 + "2: aghi %1,-256\n" 33 33 " jnm 1b\n" 34 34 " exrl %1,0b" 35 35 : "+&a" (addr), "+&a" (nr)