target/s390x: Use cpu_loop_exit_restore for tlb_fill
authorRichard Henderson <rth@twiddle.net>
Thu, 18 May 2017 19:10:53 +0000 (12:10 -0700)
committerRichard Henderson <rth@twiddle.net>
Tue, 6 Jun 2017 21:34:31 +0000 (14:34 -0700)
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
target/s390x/mem_helper.c

index 0c6a0d9612cb80b943b21a171669040ac4e13a2b..e3325a4f6393f6d04e9b2e5f650011a52ed44368 100644 (file)
 void tlb_fill(CPUState *cs, target_ulong addr, MMUAccessType access_type,
               int mmu_idx, uintptr_t retaddr)
 {
-    int ret;
-
-    ret = s390_cpu_handle_mmu_fault(cs, addr, access_type, mmu_idx);
+    int ret = s390_cpu_handle_mmu_fault(cs, addr, access_type, mmu_idx);
     if (unlikely(ret != 0)) {
-        if (likely(retaddr)) {
-            /* now we have a real cpu fault */
-            cpu_restore_state(cs, retaddr);
-        }
-        cpu_loop_exit(cs);
+        cpu_loop_exit_restore(cs, retaddr);
     }
 }