kern: Add special-case for InvalidateProcessDataCache on current process

This commit is contained in:
Michael Scire authored and SciresM committed 2023-10-12 08:55:58 -07:00
1 parent 2a4d68f916
commit 3737151a2f
4 files changed
+27 -1

No files matched your search

@@ -102,7 +102,11 @@ namespace ams::kern::svc {
R_UNLESS(process.IsNotNull(), svc::ResultInvalidHandle());
/* Invalidate the cache. */
R_TRY(process->GetPageTable().InvalidateProcessDataCache(address, size));
if (process.GetPointerUnsafe() == GetCurrentProcessPointer()) {
R_TRY(process->GetPageTable().InvalidateCurrentProcessDataCache(address, size));
} else {
R_TRY(process->GetPageTable().InvalidateProcessDataCache(address, size));
}
R_SUCCEED();
}