mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Fix sys_rsx_context_iounmap partial unmapping
This commit is contained in:
parent
070c3af50f
commit
492c9e3c7c
1 changed files with 4 additions and 3 deletions
|
@ -219,10 +219,11 @@ error_code sys_rsx_context_iounmap(u32 context_id, u32 io, u32 size)
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 end = (io >>= 20) + (size >>= 20);
|
const u32 end = (io >>= 20) + (size >>= 20);
|
||||||
for (u32 ea = RSXIOMem.ea[io]; io < end;)
|
|
||||||
|
while (io < end)
|
||||||
{
|
{
|
||||||
RSXIOMem.io[ea++].raw() = 0xFFFF;
|
const u32 ea_entry = std::exchange(RSXIOMem.ea[io++].raw(), 0xFFFF);
|
||||||
RSXIOMem.ea[io++].raw() = 0xFFFF;
|
if (ea_entry < 512) RSXIOMem.io[ea_entry].raw() = 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::atomic_thread_fence(std::memory_order_seq_cst);
|
std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue