xen/arm64: head: Rework and document check_cpu_mode()
authorJulien Grall <julien.grall@arm.com>
Fri, 7 Jun 2019 18:29:03 +0000 (19:29 +0100)
committerJulien Grall <julien.grall@arm.com>
Wed, 31 Jul 2019 19:29:40 +0000 (20:29 +0100)
commitcb8c713f4030eeb2ca5a5919ff9311032f5288ad
tree05c794235a1e0f9e449679e84be6d9de8b331f82
parentf5f214d63562faa3a4ef3f0b14e9443e85a6b54d
xen/arm64: head: Rework and document check_cpu_mode()

A branch in the success case can be avoided by inverting the branch
condition. At the same time, remove a pointless comment as Xen can only
run at EL2.

Lastly, document the behavior and the main registers usage within the
function.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm64/head.S