From b6c7551747af4f408a163dc197f5ac4c2ad33fe4 Mon Sep 17 00:00:00 2001 From: Oded Gabbay Date: Tue, 28 Apr 2015 17:50:00 +0300 Subject: [PATCH] Revert "Add execution property in register memory for gfx801." This reverts commit abf7770d46b3a41df911bf58a546f9731bbb8abe. [ROCm/ROCR-Runtime commit: 4c4df3803559eccea008c0e0ac17546ed535b8ce] --- projects/rocr-runtime/include/hsakmt.h | 3 +-- projects/rocr-runtime/src/memory.c | 14 +------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/projects/rocr-runtime/include/hsakmt.h b/projects/rocr-runtime/include/hsakmt.h index 321df6e6c9..fd2788803d 100644 --- a/projects/rocr-runtime/include/hsakmt.h +++ b/projects/rocr-runtime/include/hsakmt.h @@ -364,8 +364,7 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterMemory( void* MemoryAddress, //IN (page-aligned) - HSAuint64 MemorySizeInBytes, //IN (page-aligned) - int ExecuteAccess + HSAuint64 MemorySizeInBytes //IN (page-aligned) ); diff --git a/projects/rocr-runtime/src/memory.c b/projects/rocr-runtime/src/memory.c index 0be2a0f738..68d86d5e5e 100644 --- a/projects/rocr-runtime/src/memory.c +++ b/projects/rocr-runtime/src/memory.c @@ -170,23 +170,11 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterMemory( void *MemoryAddress, /* IN (page-aligned) */ - HSAuint64 MemorySizeInBytes, /* IN (page-aligned) */ - int ExecuteAccess + HSAuint64 MemorySizeInBytes /* IN (page-aligned) */ ) { 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; }