OSDN Git Service

KVM: arm64: Turn __KVM_HOST_SMCCC_FUNC_* into an enum (mostly)
authorMarc Zyngier <maz@kernel.org>
Fri, 8 Oct 2021 13:58:34 +0000 (14:58 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 11 Oct 2021 08:07:28 +0000 (09:07 +0100)
commita78738ed1d9bf40d09109599b884508c69d188b8
tree5ffc4c4445d8205167f008b056a2ad54906f4a60
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896
KVM: arm64: Turn __KVM_HOST_SMCCC_FUNC_* into an enum (mostly)

__KVM_HOST_SMCCC_FUNC_* is a royal pain, as there is a fair amount
of churn around these #defines, and we avoid making it an enum
only for the sake of the early init, low level code that requires
__KVM_HOST_SMCCC_FUNC___kvm_hyp_init to be usable from assembly.

Let's be brave and turn everything but this symbol into an enum,
using a bit of arithmetic to avoid any overlap.

Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/877depq9gw.wl-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-2-will@kernel.org
arch/arm64/include/asm/kvm_asm.h