]> xenbits.xensource.com Git - people/dwmw2/xen.git/commit
xen/arm: traps: Avoid using BUG_ON() in _show_registers()
authorJulien Grall <julien.grall@arm.com>
Wed, 15 May 2019 16:16:13 +0000 (17:16 +0100)
committerJulien Grall <julien.grall@arm.com>
Wed, 31 Jul 2019 19:19:23 +0000 (20:19 +0100)
commite04818b46d6b08ae22d4ef05fa4dc685bba42f57
tree44c135ee390047676ba27793ed2e429842ac60fd
parentaa2f5aefa8de4fe9f327aef7c9095e71d44b1e8a
xen/arm: traps: Avoid using BUG_ON() in _show_registers()

At the moment, _show_registers() is using a BUG_ON() to assert only
userspace will run 32-bit code in a 64-bit domain.

Such extra precaution is not necessary and could be avoided by only
checking the CPU mode to decide whether show_registers_64() or
show_reigsters_32() should be called.

This has also the nice advantage to avoid nested if in the code.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c