mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
drm/amdgpu: flush TLB if valid PDE turns into PTE
Mapping huge page, 2MB aligned address with 2MB size, uses PDE0 as PTE. If previously valid PDE0, PDE0.V=1 and PDE0.P=0 turns into PTE, this requires TLB flush, otherwise page table walker will not read updated PDE0. Change page table update mapping to return table_freed flag to indicate the previously valid PDE may have turned into a PTE if page table is freed. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
a6ce1e1aab
commit
bf546940d5
@@ -231,6 +231,11 @@ struct amdgpu_vm_update_params {
|
||||
* @num_dw_left: number of dw left for the IB
|
||||
*/
|
||||
unsigned int num_dw_left;
|
||||
|
||||
/**
|
||||
* @table_freed: return true if page table is freed when updating
|
||||
*/
|
||||
bool table_freed;
|
||||
};
|
||||
|
||||
struct amdgpu_vm_update_funcs {
|
||||
@@ -404,7 +409,7 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
|
||||
uint64_t flags, uint64_t offset,
|
||||
struct ttm_resource *res,
|
||||
dma_addr_t *pages_addr,
|
||||
struct dma_fence **fence);
|
||||
struct dma_fence **fence, bool *free_table);
|
||||
int amdgpu_vm_bo_update(struct amdgpu_device *adev,
|
||||
struct amdgpu_bo_va *bo_va,
|
||||
bool clear);
|
||||
|
||||
Reference in New Issue
Block a user