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 696860132f043f602ac96f2e49a03b596a047620..338aee7f2aba863570f859a14eb13f1ac10e2719 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;