Skip to content

Commit 8810c6e

Browse files
Keir FraserMarc Zyngier
authored andcommitted
KVM: arm64: vgic-init: Remove vgic_ready() macro
It is now used only within kvm_vgic_map_resources(). vgic_dist::ready is already written directly by this function, so it is clearer to bypass the macro for reads as well. Signed-off-by: Keir Fraser <keirf@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 1b237f1 commit 8810c6e

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

arch/arm64/kvm/vgic/vgic-init.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,6 @@ int vgic_lazy_init(struct kvm *kvm)
554554
* Also map the virtual CPU interface into the VM.
555555
* v2 calls vgic_init() if not already done.
556556
* v3 and derivatives return an error if the VGIC is not initialized.
557-
* vgic_ready() returns true if this function has succeeded.
558557
*/
559558
int kvm_vgic_map_resources(struct kvm *kvm)
560559
{
@@ -563,12 +562,12 @@ int kvm_vgic_map_resources(struct kvm *kvm)
563562
gpa_t dist_base;
564563
int ret = 0;
565564

566-
if (likely(vgic_ready(kvm)))
565+
if (likely(dist->ready))
567566
return 0;
568567

569568
mutex_lock(&kvm->slots_lock);
570569
mutex_lock(&kvm->arch.config_lock);
571-
if (vgic_ready(kvm))
570+
if (dist->ready)
572571
goto out;
573572

574573
if (!irqchip_in_kernel(kvm))

include/kvm/arm_vgic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ u64 vgic_v3_get_misr(struct kvm_vcpu *vcpu);
406406

407407
#define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel))
408408
#define vgic_initialized(k) ((k)->arch.vgic.initialized)
409-
#define vgic_ready(k) ((k)->arch.vgic.ready)
410409
#define vgic_valid_spi(k, i) (((i) >= VGIC_NR_PRIVATE_IRQS) && \
411410
((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))
412411

0 commit comments

Comments
 (0)