Revert "hsakmt: Only set exec flag when requested"

This reverts commit cfb1ab45ac.

Reason for revert: 
This is currently breaking some tools. Will put it back as soon as tools update their code.

Change-Id: I05c82d443f3a274a618d05e6dc5a87943f5dc7a4


[ROCm/ROCR-Runtime commit: 80da7d5ee4]
Этот коммит содержится в:
David Yat Sin
2024-10-16 18:45:18 -04:00
родитель 35187a00df
Коммит 5a8092bccf
+5 -2
Просмотреть файл
@@ -1401,8 +1401,11 @@ static uint32_t fmm_translate_hsa_to_ioc_flags(HsaMemFlags flags)
KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED);
if (!flags.ui32.ReadOnly)
ioc_flags |= KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE;
if (flags.ui32.ExecuteAccess)
ioc_flags |= KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE;
/* TODO: Since, ROCr interfaces doesn't allow caller to set page
* permissions, mark all user allocations with exec permission.
* Check for flags.ui32.ExecuteAccess once ROCr is ready.
*/
ioc_flags |= KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE;
return ioc_flags;
}