libhsakmt: add env var to set max VA alignment order

This env variable sets the max VA alignment order size as
"PAGE_SIZE * 2^alignment order" during mapping. By default the order
size is set to 9(2MB).

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I01ae4e0963f4d21c7c367464e60f865bc58d7fac


[ROCm/ROCR-Runtime commit: 0e908f05bb]
This commit is contained in:
Alex Sierra
2022-06-09 11:14:41 -05:00
committed by Alejandro Sierra Guiza
parent 65cea3009c
commit 62e8a0b66d
2 changed files with 19 additions and 4 deletions
-1
View File
@@ -67,7 +67,6 @@ extern int PAGE_SHIFT;
/* 2MB huge page size for 4-level page tables on Vega10 and later GPUs */
#define GPU_HUGE_PAGE_SIZE (2 << 20)
#define GPU_GIANT_PAGE_SIZE (1 << 30)
#define CHECK_PAGE_MULTIPLE(x) \
do { if ((uint64_t)PORT_VPTR_TO_UINT64(x) % PAGE_SIZE) return HSAKMT_STATUS_INVALID_PARAMETER; } while(0)