diff options
author | Eric Auger <eric.auger@redhat.com> | 2018-05-22 09:55:09 +0200 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2018-05-25 12:29:26 +0100 |
commit | dc524619369c320e057cb198bbca017f3a0bb69a (patch) | |
tree | 6094b7ecf66f4b91f4b5440a9af4634ba0891f29 /virt/kvm/arm/vgic/vgic-mmio-v3.c | |
parent | dbd9733ab6742dfb7d4f6c49e7d412d4e792d8be (diff) | |
download | linux-dc524619369c320e057cb198bbca017f3a0bb69a.tar.bz2 |
KVM: arm/arm64: Helper to locate free rdist index
We introduce vgic_v3_rdist_free_slot to help identifying
where we can place a new 2x64KB redistributor.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-mmio-v3.c')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-mmio-v3.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/virt/kvm/arm/vgic/vgic-mmio-v3.c b/virt/kvm/arm/vgic/vgic-mmio-v3.c index d1aab183a1cc..49ca176e2e08 100644 --- a/virt/kvm/arm/vgic/vgic-mmio-v3.c +++ b/virt/kvm/arm/vgic/vgic-mmio-v3.c @@ -593,8 +593,7 @@ int vgic_register_redist_iodev(struct kvm_vcpu *vcpu) * function for all VCPUs when the base address is set. Just return * without doing any work for now. */ - rdreg = list_first_entry(&vgic->rd_regions, - struct vgic_redist_region, list); + rdreg = vgic_v3_rdist_free_slot(&vgic->rd_regions); if (!rdreg) return 0; |