diff --git a/arch/arm64/kvm/arch_timer.c b/arch/arm64/kvm/arch_timer.c index 1215df590418..10c293c2d2f5 100644 --- a/arch/arm64/kvm/arch_timer.c +++ b/arch/arm64/kvm/arch_timer.c @@ -1238,12 +1238,10 @@ void kvm_arm_timer_write_sysreg(struct kvm_vcpu *vcpu, } } -static int timer_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu) +static int timer_irq_set_vcpu_affinity(struct irq_data *d, + void __always_unused *vcpu) { - if (vcpu) - irqd_set_forwarded_to_vcpu(d); - else - irqd_clr_forwarded_to_vcpu(d); + irqd_set_forwarded_to_vcpu(d); return 0; } @@ -1391,8 +1389,7 @@ int __init kvm_timer_hyp_init(bool has_gic) } if (has_gic) { - err = irq_set_vcpu_affinity(host_vtimer_irq, - kvm_get_running_vcpus()); + err = irq_set_vcpu_affinity(host_vtimer_irq, NULL); if (err) { kvm_err("kvm_arch_timer: error setting vcpu affinity\n"); goto out_free_vtimer_irq; @@ -1415,8 +1412,7 @@ int __init kvm_timer_hyp_init(bool has_gic) } if (has_gic) { - err = irq_set_vcpu_affinity(host_ptimer_irq, - kvm_get_running_vcpus()); + err = irq_set_vcpu_affinity(host_ptimer_irq, NULL); if (err) { kvm_err("kvm_arch_timer: error setting vcpu affinity\n"); goto out_free_ptimer_irq;