KVM: s390: drop use of spin lock in __floating_irq_kick
authorMichael Mueller <mimu@linux.vnet.ibm.com>
Mon, 20 Nov 2017 09:37:30 +0000 (10:37 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 16 Jan 2018 15:15:18 +0000 (16:15 +0100)
It is not required to take to a lock to protect access to the cpuflags
of the local interrupt structure of a vcpu as the performed operation
is an atomic_or.

Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/interrupt.c

index 024ad8bcc51655e98ffed300817bc0e06e051cf7..818aa4248b0f3650df6b11464c0f936b5db530b8 100644 (file)
@@ -1569,7 +1569,6 @@ static void __floating_irq_kick(struct kvm *kvm, u64 type)
 
        /* make the VCPU drop out of the SIE, or wake it up if sleeping */
        li = &dst_vcpu->arch.local_int;
-       spin_lock(&li->lock);
        switch (type) {
        case KVM_S390_MCHK:
                atomic_or(CPUSTAT_STOP_INT, li->cpuflags);
@@ -1581,7 +1580,6 @@ static void __floating_irq_kick(struct kvm *kvm, u64 type)
                atomic_or(CPUSTAT_EXT_INT, li->cpuflags);
                break;
        }
-       spin_unlock(&li->lock);
        kvm_s390_vcpu_wakeup(dst_vcpu);
 }