diff options
| author | 2022-02-21 13:38:52 -0700 | |
|---|---|---|
| committer | 2022-02-21 13:38:52 -0700 | |
| commit | 8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a (patch) | |
| tree | 4e5ad04403eac4b738b5fbb62c0c2731cd8afc40 /src | |
| parent | Merge pull request #7867 from german77/amiibo (diff) | |
| parent | core: hle: kernel: KPageTable: Fix UnmapPages. (diff) | |
| download | yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar.gz yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar.xz yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.zip | |
Merge pull request #7920 from bunnei/fix-unmap-pages
core: hle: kernel: KPageTable: Fix UnmapPages.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_page_table.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index 912853e5c..a9eb70b8b 100644 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp | |||
| @@ -681,9 +681,8 @@ ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked | |||
| 681 | VAddr cur_addr{addr}; | 681 | VAddr cur_addr{addr}; |
| 682 | 682 | ||
| 683 | for (const auto& node : page_linked_list.Nodes()) { | 683 | for (const auto& node : page_linked_list.Nodes()) { |
| 684 | const std::size_t num_pages{(addr - cur_addr) / PageSize}; | 684 | if (const auto result{Operate(cur_addr, node.GetNumPages(), KMemoryPermission::None, |
| 685 | if (const auto result{ | 685 | OperationType::Unmap)}; |
| 686 | Operate(addr, num_pages, KMemoryPermission::None, OperationType::Unmap)}; | ||
| 687 | result.IsError()) { | 686 | result.IsError()) { |
| 688 | return result; | 687 | return result; |
| 689 | } | 688 | } |