.. | .. |
---|
1 | 1 | // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note |
---|
2 | 2 | /* |
---|
3 | 3 | * |
---|
4 | | - * (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved. |
---|
| 4 | + * (C) COPYRIGHT 2019-2022 ARM Limited. All rights reserved. |
---|
5 | 5 | * |
---|
6 | 6 | * This program is free software and is provided to you under the terms of the |
---|
7 | 7 | * GNU General Public License version 2 as published by the Free Software |
---|
.. | .. |
---|
140 | 140 | return pte; |
---|
141 | 141 | } |
---|
142 | 142 | |
---|
| 143 | +/** |
---|
| 144 | + * kbase_native_mgm_pte_to_original_pte - Native method to undo changes done in |
---|
| 145 | + * kbase_native_mgm_update_gpu_pte() |
---|
| 146 | + * |
---|
| 147 | + * @mgm_dev: The memory group manager the request is being made through. |
---|
| 148 | + * @group_id: A physical memory group ID, which must be valid but is not used. |
---|
| 149 | + * Its valid range is 0 .. MEMORY_GROUP_MANAGER_NR_GROUPS-1. |
---|
| 150 | + * @mmu_level: The level of the MMU page table where the page is getting mapped. |
---|
| 151 | + * @pte: The prepared page table entry. |
---|
| 152 | + * |
---|
| 153 | + * This function simply returns the @pte without modification. |
---|
| 154 | + * |
---|
| 155 | + * Return: A GPU page table entry to be stored in a page table. |
---|
| 156 | + */ |
---|
| 157 | +static u64 kbase_native_mgm_pte_to_original_pte(struct memory_group_manager_device *mgm_dev, |
---|
| 158 | + int group_id, int mmu_level, u64 pte) |
---|
| 159 | +{ |
---|
| 160 | + CSTD_UNUSED(mgm_dev); |
---|
| 161 | + CSTD_UNUSED(group_id); |
---|
| 162 | + CSTD_UNUSED(mmu_level); |
---|
| 163 | + |
---|
| 164 | + return pte; |
---|
| 165 | +} |
---|
| 166 | + |
---|
143 | 167 | struct memory_group_manager_device kbase_native_mgm_dev = { |
---|
144 | 168 | .ops = { |
---|
145 | 169 | .mgm_alloc_page = kbase_native_mgm_alloc, |
---|
.. | .. |
---|
147 | 171 | .mgm_get_import_memory_id = NULL, |
---|
148 | 172 | .mgm_vmf_insert_pfn_prot = kbase_native_mgm_vmf_insert_pfn_prot, |
---|
149 | 173 | .mgm_update_gpu_pte = kbase_native_mgm_update_gpu_pte, |
---|
| 174 | + .mgm_pte_to_original_pte = kbase_native_mgm_pte_to_original_pte, |
---|
150 | 175 | }, |
---|
151 | 176 | .data = NULL |
---|
152 | 177 | }; |
---|