drm/amdgpu: handle PTE EXEC in amdgpu_vm_bo_split_mapping
authorAlex Xie <AlexBin.Xie@amd.com>
Fri, 3 Mar 2017 21:47:11 +0000 (16:47 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:54:42 +0000 (23:54 -0400)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 6968601..338aee7 100644 (file)
@@ -1110,6 +1110,9 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,
        if (!(mapping->flags & AMDGPU_PTE_WRITEABLE))
                flags &= ~AMDGPU_PTE_WRITEABLE;
 
+       flags &= ~AMDGPU_PTE_EXECUTABLE;
+       flags |= mapping->flags & AMDGPU_PTE_EXECUTABLE;
+
        trace_amdgpu_vm_bo_update(mapping);
 
        pfn = mapping->offset >> PAGE_SHIFT;