OSDN Git Service

target/ppc: reset reservation in do_rfi()
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Mon, 15 May 2017 08:35:09 +0000 (14:05 +0530)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 24 May 2017 01:39:52 +0000 (11:39 +1000)
For transitioning back to userspace after the interrupt.

Suggested-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/excp_helper.c

index a6bcb47..9cb2123 100644 (file)
@@ -995,6 +995,9 @@ static inline void do_rfi(CPUPPCState *env, target_ulong nip, target_ulong msr)
      */
     cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
 
+    /* Reset the reservation */
+    env->reserve_addr = -1;
+
     /* Context synchronizing: check if TCG TLB needs flush */
     check_tlb_flush(env, false);
 }