aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kvm/sigp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index c703b1cbb0aa..f3d5cc297012 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -160,12 +160,15 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action)
160 inti->type = KVM_S390_SIGP_STOP; 160 inti->type = KVM_S390_SIGP_STOP;
161 161
162 spin_lock_bh(&li->lock); 162 spin_lock_bh(&li->lock);
163 if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED))
164 goto out;
163 list_add_tail(&inti->list, &li->list); 165 list_add_tail(&inti->list, &li->list);
164 atomic_set(&li->active, 1); 166 atomic_set(&li->active, 1);
165 atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags); 167 atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags);
166 li->action_bits |= action; 168 li->action_bits |= action;
167 if (waitqueue_active(&li->wq)) 169 if (waitqueue_active(&li->wq))
168 wake_up_interruptible(&li->wq); 170 wake_up_interruptible(&li->wq);
171out:
169 spin_unlock_bh(&li->lock); 172 spin_unlock_bh(&li->lock);
170 173
171 return 0; /* order accepted */ 174 return 0; /* order accepted */