Add execution property in register memory for gfx801.

Signed-off-by: Xihan Zhang <xihan.zhang@amd.com>


[ROCm/ROCR-Runtime commit: 5ed05c99b3]
Tento commit je obsažen v:
Xihan Zhang
2015-04-10 22:26:44 +08:00
rodič 7fd679ab27
revize abf7770d46
2 změnil soubory, kde provedl 15 přidání a 2 odebrání
+13 -1
Zobrazit soubor
@@ -170,11 +170,23 @@ HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterMemory(
void *MemoryAddress, /* IN (page-aligned) */
HSAuint64 MemorySizeInBytes /* IN (page-aligned) */
HSAuint64 MemorySizeInBytes, /* IN (page-aligned) */
int ExecuteAccess
)
{
CHECK_KFD_OPEN();
int err;
/* for CZ ib execution */
if (ExecuteAccess) {
err = mprotect(MemoryAddress, MemorySizeInBytes,
PROT_READ | PROT_WRITE | PROT_EXEC);
if (err != 0) {
free(MemoryAddress);
return err;
}
}
return HSAKMT_STATUS_SUCCESS;
}