Skip to contentSkip to conversation

fixup! tcg/mips: Make direct jump patching thread-safe

PATCH Superseded Sergey Fedorov 2 participants 2 messages May 1, 2016 – May 2, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixup! tcg/mips: Make direct jump patching thread-safe

From: Sergey Fedorov <[email protected]>

---

 tcg/mips/tcg-target.inc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tcg/mips/tcg-target.inc.c +1 -1
index b0440b9c5a79..b514cd7114d2 100644
@@ -1885,6 +1885,6 @@ static void tcg_target_init(TCGContext *s)
 
 void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
 {
-    atomic_set(ptr, deposit32(OPC_J, 0, 26, addr >> 2));
+    atomic_set(jmp_addr, deposit32(OPC_J, 0, 26, addr >> 2));
     flush_icache_range(jmp_addr, jmp_addr + 4);
 }
Signature · 1 line
1.9.1
#1 lore raw
Quoted 4 lines · Sergey Fedorov

From: Sergey Fedorov <[email protected]>

Please ignore this patch, the correct one is v2.

Kind regards,
Sergey

Quoted 17 lines

---

 tcg/mips/tcg-target.inc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tcg/mips/tcg-target.inc.c +1 -1
index b0440b9c5a79..b514cd7114d2 100644
@@ -1885,6 +1885,6 @@ static void tcg_target_init(TCGContext *s)
 
 void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
 {
-    atomic_set(ptr, deposit32(OPC_J, 0, 26, addr >> 2));
+    atomic_set(jmp_addr, deposit32(OPC_J, 0, 26, addr >> 2));
     flush_icache_range(jmp_addr, jmp_addr + 4);
 }