KVM: arm/arm64: vgic: avoid map in kvm_vgic_map_is_active()
[sfrench/cifs-2.6.git] / virt / kvm / arm / vgic.c
index 81c557c0c3fd12ecc49b8d8abe77ba55fb5110ad..2fd43a6146a92c654c860f051097714d6c11bac9 100644 (file)
@@ -1102,18 +1102,18 @@ static bool dist_active_irq(struct kvm_vcpu *vcpu)
        return test_bit(vcpu->vcpu_id, dist->irq_active_on_cpu);
 }
 
-bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, struct irq_phys_map *map)
+bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, unsigned int virt_irq)
 {
        int i;
 
        for (i = 0; i < vcpu->arch.vgic_cpu.nr_lr; i++) {
                struct vgic_lr vlr = vgic_get_lr(vcpu, i);
 
-               if (vlr.irq == map->virt_irq && vlr.state & LR_STATE_ACTIVE)
+               if (vlr.irq == virt_irq && vlr.state & LR_STATE_ACTIVE)
                        return true;
        }
 
-       return vgic_irq_is_active(vcpu, map->virt_irq);
+       return vgic_irq_is_active(vcpu, virt_irq);
 }
 
 /*