From e37863d7f2aba4659cb4ed1eb84dfcc05fec338a Mon Sep 17 00:00:00 2001 From: Ben Goz Date: Thu, 28 Jan 2016 14:47:02 +0200 Subject: [PATCH] Adding HsaMemMapFlags struct Change-Id: Ib0ee6dede1169582fd58bfca648347c3f8aa0b54 Signed-off-by: Ben Goz --- include/hsakmttypes.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/hsakmttypes.h b/include/hsakmttypes.h index 5b4eeba1e1..75fbcb7a58 100644 --- a/include/hsakmttypes.h +++ b/include/hsakmttypes.h @@ -469,6 +469,36 @@ typedef struct _HsaMemFlags }; } HsaMemFlags; +typedef struct _HsaMemMapFlags +{ + union + { + struct + { + unsigned int Reserved1 : 1; // + unsigned int CachePolicy : 4; // see HSA_CACHING_TYPE + unsigned int ReadOnly : 1; // memory is not modified while mapped + // allows migration scale-out + unsigned int PageSize : 2; // see HSA_PAGE_SIZE, hint to use + // this page size if possible and + // smaller than default + unsigned int HostAccess : 1; // default = 0: GPU access only + unsigned int Migrate : 1; // Hint: Allows migration to local mem + // of mapped GPU(s), instead of mapping + // physical location + unsigned int Probe : 1; // default = 0: Indicates that a range + // will be mapped by the process soon, + // but does not initiate a map operation + // may trigger eviction of nonessential + // data from the memory, reduces latency + // “cleanup hint” only, may be ignored + unsigned int Reserved : 21; + }; + HSAuint32 Value; + }; +} HsaMemMapFlags; + + typedef enum _HSA_CACHING_TYPE { HSA_CACHING_CACHED = 0,