mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
l4t/l4t-r32.7.5
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>
Description
No description provided