mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
SPU: Remove condition from GETLLAR spin detection
This commit is contained in:
parent
3dc75dc3d1
commit
11e3aa660e
@ -4533,7 +4533,7 @@ bool spu_thread::process_mfc_cmd()
|
||||
if ([&]() -> bool
|
||||
{
|
||||
// Validation that it is indeed GETLLAR spinning (large time window is intentional)
|
||||
if (last_getllar_addr != addr || last_getllar != pc || last_getllar_gpr1 != gpr[1]._u32[3] || perf0.get() - last_gtsc >= 5'000 || (interrupts_enabled && ch_events.load().mask))
|
||||
if (last_getllar_addr != addr || last_getllar_gpr1 != gpr[1]._u32[3] || perf0.get() - last_gtsc >= 5'000 || (interrupts_enabled && ch_events.load().mask))
|
||||
{
|
||||
// Seemingly not
|
||||
getllar_busy_waiting_switch = umax;
|
||||
@ -4553,7 +4553,7 @@ bool spu_thread::process_mfc_cmd()
|
||||
if (percent != 101)
|
||||
{
|
||||
// Predict whether or not to use operating system sleep based on history
|
||||
auto& stats = getllar_wait_time[pc / 32];
|
||||
auto& stats = getllar_wait_time[(addr % SPU_LS_SIZE) / 128];
|
||||
|
||||
const auto old_stats = stats;
|
||||
std::array<u8, 4> new_stats{};
|
||||
@ -4613,7 +4613,7 @@ bool spu_thread::process_mfc_cmd()
|
||||
if (percent != 101)
|
||||
{
|
||||
spu_log.trace("SPU wait for 0x%x", addr);
|
||||
getllar_wait_time[pc / 32].front() = 1;
|
||||
getllar_wait_time[(addr % SPU_LS_SIZE) / 128].front() = 1;
|
||||
getllar_busy_waiting_switch = 0;
|
||||
}
|
||||
}
|
||||
@ -4636,7 +4636,7 @@ bool spu_thread::process_mfc_cmd()
|
||||
|
||||
if (getllar_busy_waiting_switch == 1)
|
||||
{
|
||||
getllar_wait_time[pc / 32].front() = 0;
|
||||
getllar_wait_time[(addr % SPU_LS_SIZE) / 128].front() = 0;
|
||||
|
||||
#if defined(ARCH_X64)
|
||||
if (utils::has_um_wait())
|
||||
@ -4705,7 +4705,7 @@ bool spu_thread::process_mfc_cmd()
|
||||
rtime = new_time;
|
||||
}
|
||||
|
||||
u8& val = getllar_wait_time[pc / 32].front();
|
||||
u8& val = getllar_wait_time[(addr % SPU_LS_SIZE) / 128].front();
|
||||
val = static_cast<u8>(std::min<u32>(val + 1, u8{umax}));
|
||||
|
||||
// Reset perf
|
||||
|
@ -819,7 +819,7 @@ public:
|
||||
u32 current_bp_pc = umax;
|
||||
bool stop_flag_removal_protection = false;
|
||||
|
||||
std::array<std::array<u8, 4>, SPU_LS_SIZE / 32> getllar_wait_time{};
|
||||
std::array<std::array<u8, 4>, SPU_LS_SIZE / 128> getllar_wait_time{};
|
||||
|
||||
void push_snr(u32 number, u32 value);
|
||||
static void do_dma_transfer(spu_thread* _this, const spu_mfc_cmd& args, u8* ls);
|
||||
|
Loading…
Reference in New Issue
Block a user