From 4c4df3803559eccea008c0e0ac17546ed535b8ce 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 5ed05c99b3cbddbca389127b3656f38493f8339a. --- include/hsakmt.h | 3 +-- src/memory.c | 14 +------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/include/hsakmt.h b/include/hsakmt.h index 321df6e6c9..fd2788803d 100644 --- a/include/hsakmt.h +++ b/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/src/memory.c b/src/memory.c index 0be2a0f738..68d86d5e5e 100644 --- a/src/memory.c +++ b/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; }