xen/arm: Rework psr_mode_is_32bit()
authorJulien Grall <julien.grall@arm.com>
Wed, 15 May 2019 13:34:55 +0000 (14:34 +0100)
committerJulien Grall <julien.grall@arm.com>
Wed, 31 Jul 2019 19:19:23 +0000 (20:19 +0100)
commitaa2f5aefa8de4fe9f327aef7c9095e71d44b1e8a
tree4214a4989ce49aa65f81b699cafc9117dbef0856
parent875f487bda2ba2e4ed6390db1f9da4728658b6c2
xen/arm: Rework psr_mode_is_32bit()

psr_mode_is_32bit() prototype does not match the rest of the helpers for
the process state. Looking at the callers, most of them will access
struct cpu_user_regs just for calling psr_mode_is_32bit().

The macro is now reworked to take a struct cpu_user_regs in parameter.
At the same time take the opportunity to switch to a static inline
helper.

Lastly, when compiled for 32-bit, Xen will only support 32-bit guest. So
it is pointless to check whether the register state correspond to 64-bit
or not.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c
xen/include/asm-arm/regs.h