mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 21:32:50 +00:00
PPU: Clear reservation on context switch
Ensure that only 2 PPU reservations exist at maximum at a time.
This commit is contained in:
parent
0e6937a359
commit
72bef8dd7f
@ -456,6 +456,10 @@ std::string ppu_thread::dump_regs() const
|
|||||||
fmt::append(ret, "XER = [CA=%u | OV=%u | SO=%u | CNT=%u]\n", xer.ca, xer.ov, xer.so, xer.cnt);
|
fmt::append(ret, "XER = [CA=%u | OV=%u | SO=%u | CNT=%u]\n", xer.ca, xer.ov, xer.so, xer.cnt);
|
||||||
fmt::append(ret, "VSCR = [SAT=%u | NJ=%u]\n", sat, nj);
|
fmt::append(ret, "VSCR = [SAT=%u | NJ=%u]\n", sat, nj);
|
||||||
fmt::append(ret, "FPSCR = [FL=%u | FG=%u | FE=%u | FU=%u]\n", fpscr.fl, fpscr.fg, fpscr.fe, fpscr.fu);
|
fmt::append(ret, "FPSCR = [FL=%u | FG=%u | FE=%u | FU=%u]\n", fpscr.fl, fpscr.fg, fpscr.fe, fpscr.fu);
|
||||||
|
if (const u32 addr = raddr)
|
||||||
|
fmt::append(ret, "Reservation Addr = 0x%x", addr);
|
||||||
|
else
|
||||||
|
fmt::append(ret, "Reservation Addr = none");
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -666,6 +670,7 @@ void ppu_thread::cpu_task()
|
|||||||
|
|
||||||
void ppu_thread::cpu_sleep()
|
void ppu_thread::cpu_sleep()
|
||||||
{
|
{
|
||||||
|
raddr = 0; // Clear reservation
|
||||||
vm::temporary_unlock(*this);
|
vm::temporary_unlock(*this);
|
||||||
lv2_obj::awake(this);
|
lv2_obj::awake(this);
|
||||||
}
|
}
|
||||||
|
@ -1109,9 +1109,16 @@ void lv2_obj::sleep_unlocked(cpu_thread& thread, u64 timeout)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find and remove the thread
|
// Find and remove the thread
|
||||||
unqueue(g_ppu, ppu);
|
if (!unqueue(g_ppu, ppu))
|
||||||
|
{
|
||||||
|
// Already sleeping
|
||||||
|
ppu_log.trace("sleep(): called on already sleeping thread.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
unqueue(g_pending, ppu);
|
unqueue(g_pending, ppu);
|
||||||
|
|
||||||
|
ppu->raddr = 0; // Clear reservation
|
||||||
ppu->start_time = start_time;
|
ppu->start_time = start_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user