citra-emu
/
citra
Archived
1
0
Fork 0

Memory: remove GetMMIOHandler with current process

This commit is contained in:
Weiyi Wang 2018-11-17 14:34:26 -05:00
parent 7308b8d294
commit d4ba87d90a
1 changed files with 2 additions and 8 deletions

View File

@ -110,12 +110,6 @@ static MMIORegionPointer GetMMIOHandler(const PageTable& page_table, VAddr vaddr
return nullptr; // Should never happen return nullptr; // Should never happen
} }
static MMIORegionPointer GetMMIOHandler(VAddr vaddr) {
const PageTable& page_table =
Core::System::GetInstance().Kernel().GetCurrentProcess()->vm_manager.page_table;
return GetMMIOHandler(page_table, vaddr);
}
template <typename T> template <typename T>
T ReadMMIO(MMIORegionPointer mmio_handler, VAddr addr); T ReadMMIO(MMIORegionPointer mmio_handler, VAddr addr);
@ -148,7 +142,7 @@ T Read(const VAddr vaddr) {
return value; return value;
} }
case PageType::Special: case PageType::Special:
return ReadMMIO<T>(GetMMIOHandler(vaddr), vaddr); return ReadMMIO<T>(GetMMIOHandler(*current_page_table, vaddr), vaddr);
default: default:
UNREACHABLE(); UNREACHABLE();
} }
@ -184,7 +178,7 @@ void Write(const VAddr vaddr, const T data) {
break; break;
} }
case PageType::Special: case PageType::Special:
WriteMMIO<T>(GetMMIOHandler(vaddr), vaddr, data); WriteMMIO<T>(GetMMIOHandler(*current_page_table, vaddr), vaddr, data);
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();