diff options
author | Vladimir Murzin <vladimir.murzin@arm.com> | 2016-09-22 09:18:01 +0100 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-09-22 13:30:46 +0200 |
commit | 6134993789b76d85102d68a286b8b82cb53b52cb (patch) | |
tree | 508bd14b382873f2ce66466190d1d0c3defb0646 /arch/arm/kvm/arm.c | |
parent | acda5430bee4621f218391d0bcfbe4412adb3554 (diff) | |
download | op-kernel-dev-6134993789b76d85102d68a286b8b82cb53b52cb.zip op-kernel-dev-6134993789b76d85102d68a286b8b82cb53b52cb.tar.gz |
arm64: KVM: Remove duplicating init code for setting VMID
By now both VHE and non-VHE initialisation sequences query supported
VMID size. Lets keep only single instance of this code under
init_common_resources().
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/kvm/arm.c')
-rw-r--r-- | arch/arm/kvm/arm.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 75f130e..85a3f90 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -1178,6 +1178,10 @@ static int init_common_resources(void) return -ENOMEM; } + /* set size of VMID supported by CPU */ + kvm_vmid_bits = kvm_get_vmid_bits(); + kvm_info("%d-bit VMID\n", kvm_vmid_bits); + return 0; } @@ -1243,10 +1247,6 @@ static void teardown_hyp_mode(void) static int init_vhe_mode(void) { - /* set size of VMID supported by CPU */ - kvm_vmid_bits = kvm_get_vmid_bits(); - kvm_info("%d-bit VMID\n", kvm_vmid_bits); - kvm_info("VHE mode initialized successfully\n"); return 0; } @@ -1330,10 +1330,6 @@ static int init_hyp_mode(void) } } - /* set size of VMID supported by CPU */ - kvm_vmid_bits = kvm_get_vmid_bits(); - kvm_info("%d-bit VMID\n", kvm_vmid_bits); - kvm_info("Hyp mode initialized successfully\n"); return 0; |