From 777df5c6dc8b922c70bf3aa5ed6cb078a23673ce Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Tue, 1 Aug 2023 21:17:22 +0000 Subject: [PATCH] Fix flags passed to thunk for address reserve Fix flags passed to thunk when reserving address only Change-Id: Ic91d4c3393cc6a2b98e6bc5ed3575d40fa5e1424 [ROCm/ROCR-Runtime commit: 7be305b83c6003b6fc24df1338df69cc11aac392] --- .../rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index 8bfca258fc..ed3ab60d92 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -2433,10 +2433,10 @@ hsa_status_t Runtime::VMemoryAddressReserve(void** va, size_t size, uint64_t add uint64_t flags) { void* addr = (void*)address; HsaMemFlags memFlags = {}; - - ScopedAcquire lock(&memory_lock_); + memFlags.ui32.OnlyAddress = 1; + memFlags.ui32.FixedAddress = 1; /* Try to reserving the VA requested by user */ if (hsaKmtAllocMemory(0, size, memFlags, &addr) != HSAKMT_STATUS_SUCCESS) { memFlags.ui32.FixedAddress = 0;