xen/arm: io: Abstract sign-extension
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Fri, 29 Jan 2021 01:48:47 +0000 (03:48 +0200)
committerJulien Grall <jgrall@amazon.com>
Fri, 29 Jan 2021 16:55:41 +0000 (16:55 +0000)
commit56608aecfb41a54aca85e11147e1c73903f38acf
tree87508b6ac6c40d4370b274fe206d6db82a4501de
parent5d752df85f2c8faf87736cba05113435c7e9a9f1
xen/arm: io: Abstract sign-extension

In order to avoid code duplication (both handle_read() and
handle_ioserv() contain the same code for the sign-extension)
put this code to a common helper to be used for both.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
CC: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <jgrall@amazon.com>
[On Arm only]
Tested-by: Wei Chen <Wei.Chen@arm.com>
xen/arch/arm/io.c
xen/arch/arm/ioreq.c
xen/include/asm-arm/traps.h