aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp/debug-sr.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-10-25 13:58:00 +0000
committerAlex Shi <alex.shi@linaro.org>2016-05-24 16:42:23 +0800
commit7142507a8e6d872063d22c81e91f9c34dc32a328 (patch)
tree535db318696f8460ed644730091ec8c5c0bef9ac /arch/arm64/kvm/hyp/debug-sr.c
parent8803d251328418ebf09140cbe930b698ef6441f4 (diff)
arm64: KVM: Add compatibility aliases
So far, we've implemented the new world switch with a completely different namespace, so that we could have both implementation compiled in. Let's take things one step further by adding weak aliases that have the same names as the original implementation. The weak attributes allows the new implementation to be overriden by the old one, and everything still work. At a later point, we'll be able to simply drop the old code, and everything will hopefully keep working, thanks to the aliases we have just added. This also saves us repainting all the callers. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> (cherry picked from commit 044ac37d1281fc7b59d5dce4fe979a99369e95f2) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'arch/arm64/kvm/hyp/debug-sr.c')
-rw-r--r--arch/arm64/kvm/hyp/debug-sr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c
index f0c2abb3b5b1..9b7b9a9800d1 100644
--- a/arch/arm64/kvm/hyp/debug-sr.c
+++ b/arch/arm64/kvm/hyp/debug-sr.c
@@ -136,3 +136,6 @@ u32 __hyp_text __debug_read_mdcr_el2(void)
{
return read_sysreg(mdcr_el2);
}
+
+__alias(__debug_read_mdcr_el2)
+u32 __weak __kvm_get_mdcr_el2(void);