From 679dfd7cdf5e5b5d3dd5618636053d8bffba3699 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Sat, 17 Nov 2018 15:24:53 -0500 Subject: [PATCH] Memory: remove CopyBlock with current process --- src/core/hle/service/gsp/gsp_gpu.cpp | 3 ++- src/core/memory.cpp | 4 ---- src/core/memory.h | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/hle/service/gsp/gsp_gpu.cpp b/src/core/hle/service/gsp/gsp_gpu.cpp index 86b4b47ce..9445aa3c3 100644 --- a/src/core/hle/service/gsp/gsp_gpu.cpp +++ b/src/core/hle/service/gsp/gsp_gpu.cpp @@ -502,7 +502,8 @@ static void ExecuteCommand(const Command& command, u32 thread_id) { // TODO(Subv): These memory accesses should not go through the application's memory mapping. // They should go through the GSP module's memory mapping. - Memory::CopyBlock(command.dma_request.dest_address, command.dma_request.source_address, + Memory::CopyBlock(*Core::System::GetInstance().Kernel().GetCurrentProcess(), + command.dma_request.dest_address, command.dma_request.source_address, command.dma_request.size); SignalInterrupt(InterruptId::DMA); break; diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 238d2d414..f589c765a 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -647,10 +647,6 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr, } } -void CopyBlock(VAddr dest_addr, VAddr src_addr, const std::size_t size) { - CopyBlock(*Core::System::GetInstance().Kernel().GetCurrentProcess(), dest_addr, src_addr, size); -} - void CopyBlock(const Kernel::Process& src_process, const Kernel::Process& dest_process, VAddr src_addr, VAddr dest_addr, std::size_t size) { auto& page_table = src_process.vm_manager.page_table; diff --git a/src/core/memory.h b/src/core/memory.h index 06f3aed24..42372fbdc 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -201,7 +201,6 @@ void WriteBlock(const Kernel::Process& process, VAddr dest_addr, const void* src std::size_t size); void ZeroBlock(const Kernel::Process& process, VAddr dest_addr, const std::size_t size); void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr, std::size_t size); -void CopyBlock(VAddr dest_addr, VAddr src_addr, std::size_t size); void CopyBlock(const Kernel::Process& src_process, const Kernel::Process& dest_process, VAddr src_addr, VAddr dest_addr, std::size_t size);