Skip to contentSkip to conversation

target/ppc: reset reservation in do_rfi()

PATCH Applied Nikunj A Dadhania 2 participants 2 messages May 15, 2017 – May 16, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/ppc: reset reservation in do_rfi()

For transitioning back to userspace after the interrupt.

---
 target/ppc/excp_helper.c | 3 +++
 1 file changed, 3 insertions(+)
target/ppc/excp_helper.c +3 -0
index a6bcb47..9cb2123 100644
@@ -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);
 }
Signature · 1 line
2.9.3
Applied
#1 lore raw
Quoted 4 lines · Nikunj A Dadhania

For transitioning back to userspace after the interrupt.

Applied to ppc-for-2.10. thanks.

Quoted 18 lines
---
 target/ppc/excp_helper.c | 3 +++
 1 file changed, 3 insertions(+)
target/ppc/excp_helper.c +3 -0
index a6bcb47..9cb2123 100644
@@ -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);
 }
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson