FROMLIST: 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. Bug: 395485007 Bug: 357781595 Link: https://lore.kernel.org/all/20250624092256.1105524-2-keirf@google.com/ Change-Id: I924de8c4a02ed5d3af39b798af12d015d577d2f7 Signed-off-by: Keir Fraser <keirf@google.com>
This commit is contained in:
@@ -513,7 +513,6 @@ int vgic_lazy_init(struct kvm *kvm)
|
||||
* Also map the virtual CPU interface into the VM.
|
||||
* v2 calls vgic_init() if not already done.
|
||||
* v3 and derivatives return an error if the VGIC is not initialized.
|
||||
* vgic_ready() returns true if this function has succeeded.
|
||||
*/
|
||||
int kvm_vgic_map_resources(struct kvm *kvm)
|
||||
{
|
||||
@@ -522,12 +521,12 @@ int kvm_vgic_map_resources(struct kvm *kvm)
|
||||
gpa_t dist_base;
|
||||
int ret = 0;
|
||||
|
||||
if (likely(vgic_ready(kvm)))
|
||||
if (likely(dist->ready))
|
||||
return 0;
|
||||
|
||||
mutex_lock(&kvm->slots_lock);
|
||||
mutex_lock(&kvm->arch.config_lock);
|
||||
if (vgic_ready(kvm))
|
||||
if (dist->ready)
|
||||
goto out;
|
||||
|
||||
if (!irqchip_in_kernel(kvm))
|
||||
|
||||
@@ -392,7 +392,6 @@ void kvm_vgic_put(struct kvm_vcpu *vcpu);
|
||||
|
||||
#define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel))
|
||||
#define vgic_initialized(k) ((k)->arch.vgic.initialized)
|
||||
#define vgic_ready(k) ((k)->arch.vgic.ready)
|
||||
#define vgic_valid_spi(k, i) (((i) >= VGIC_NR_PRIVATE_IRQS) && \
|
||||
((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user