Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger...
[cascardo/linux.git] / arch / s390 / kvm / gaccess.c
index c1424e8..8a1be90 100644 (file)
@@ -227,10 +227,10 @@ static void ipte_lock_simple(struct kvm_vcpu *vcpu)
                goto out;
        ic = &vcpu->kvm->arch.sca->ipte_control;
        do {
-               old = ACCESS_ONCE(*ic);
+               old = READ_ONCE(*ic);
                while (old.k) {
                        cond_resched();
-                       old = ACCESS_ONCE(*ic);
+                       old = READ_ONCE(*ic);
                }
                new = old;
                new.k = 1;
@@ -249,7 +249,8 @@ static void ipte_unlock_simple(struct kvm_vcpu *vcpu)
                goto out;
        ic = &vcpu->kvm->arch.sca->ipte_control;
        do {
-               new = old = ACCESS_ONCE(*ic);
+               old = READ_ONCE(*ic);
+               new = old;
                new.k = 0;
        } while (cmpxchg(&ic->val, old.val, new.val) != old.val);
        wake_up(&vcpu->kvm->arch.ipte_wq);
@@ -263,10 +264,10 @@ static void ipte_lock_siif(struct kvm_vcpu *vcpu)
 
        ic = &vcpu->kvm->arch.sca->ipte_control;
        do {
-               old = ACCESS_ONCE(*ic);
+               old = READ_ONCE(*ic);
                while (old.kg) {
                        cond_resched();
-                       old = ACCESS_ONCE(*ic);
+                       old = READ_ONCE(*ic);
                }
                new = old;
                new.k = 1;
@@ -280,7 +281,8 @@ static void ipte_unlock_siif(struct kvm_vcpu *vcpu)
 
        ic = &vcpu->kvm->arch.sca->ipte_control;
        do {
-               new = old = ACCESS_ONCE(*ic);
+               old = READ_ONCE(*ic);
+               new = old;
                new.kh--;
                if (!new.kh)
                        new.k = 0;