Files
linux-nvgpu/drivers/gpu/nvgpu/common/mm
Thomas Steinle 7fbefcbf4b gpu: nvgpu: clear leftover ptes after failed map
The gmmu mapping code forgot to clear the already written gmmu entries
if a PD allocation failed in the middle. If nvgpu_set_pd_level() fails
when attempting to map, call it again with the same virt addr but unmap.
This may fail again if we're low on memory, but the already updated
entries are guaranteed to exist and get cleared again.

Ensure that TLB is invalidated even in error conditions since the GPU
may have already accessed the partially written data that is now
unmapped again. Likewise, flush L2 too because unmap happened.

Unify the unmap call a bit so that the gmmu attrs for an unmap are now
in only one place, including the unnecessary cbc_comptagline_mode
assignment as it's not used for unmap.

Bug 3529753

Change-Id: I37e31f25b9b303f4b2220f490535945c7389f9d7
Signed-off-by: Thomas Steinle <tsteinle@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2966793
Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com>
Tested-by: Dmitry Pervushin <dpervushin@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-10 02:21:49 -08:00
..
2019-05-09 14:41:30 -07:00