OSDN Git Service

KVM: arm64: Cleanup __activate_traps and __deactive_traps for VHE and non-VHE
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 3 Oct 2017 15:06:15 +0000 (17:06 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 10:53:19 +0000 (10:53 +0000)
commitb7787e6666061aea02be7ce084fe13c336acd0cf
tree29b4a9c558e35016d765f4d494e3ab10b89b8e01
parenta2465629b62a82b3145dc7ef40ec6c32432cf002
KVM: arm64: Cleanup __activate_traps and __deactive_traps for VHE and non-VHE

To make the code more readable and to avoid the overhead of a function
call, let's get rid of a pair of the alternative function selectors and
explicitly call the VHE and non-VHE functions using the has_vhe() static
key based selector instead, telling the compiler to try to inline the
static function if it can.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/hyp/switch.c