Avoid using PUTLLC in PUTLLUC if we know SPU LR has already been raised (#11940)
This commit is contained in:
@@ -2918,13 +2918,14 @@ void spu_thread::do_putlluc(const spu_mfc_cmd& args)
|
|||||||
// Try to process PUTLLUC using PUTLLC when a reservation is active:
|
// Try to process PUTLLUC using PUTLLC when a reservation is active:
|
||||||
// If it fails the reservation is cleared, LR event is set and we fallback to the main implementation
|
// If it fails the reservation is cleared, LR event is set and we fallback to the main implementation
|
||||||
// All of this is done atomically in PUTLLC
|
// All of this is done atomically in PUTLLC
|
||||||
if (do_putllc(args))
|
if (!(ch_events.load().events & SPU_EVENT_LR) && do_putllc(args))
|
||||||
{
|
{
|
||||||
// Success, return as our job was done here
|
// Success, return as our job was done here
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Failure, fallback to the main implementation
|
// Failure, fallback to the main implementation
|
||||||
|
raddr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
do_cell_atomic_128_store(addr, _ptr<spu_rdata_t>(args.lsa & 0x3ff80));
|
do_cell_atomic_128_store(addr, _ptr<spu_rdata_t>(args.lsa & 0x3ff80));
|
||||||
@@ -3219,6 +3220,12 @@ bool spu_thread::process_mfc_cmd()
|
|||||||
u64 ntime;
|
u64 ntime;
|
||||||
rsx::reservation_lock rsx_lock(addr, 128);
|
rsx::reservation_lock rsx_lock(addr, 128);
|
||||||
|
|
||||||
|
if (ch_events.load().events & SPU_EVENT_LR)
|
||||||
|
{
|
||||||
|
// There is no longer a need to concern about LR event if it has already been raised.
|
||||||
|
raddr = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (raddr)
|
if (raddr)
|
||||||
{
|
{
|
||||||
// Save rdata from previous reservation
|
// Save rdata from previous reservation
|
||||||
|
|||||||
Reference in New Issue
Block a user