wsl/libhsakmt: move PAGE_SIZE/SHIFT to static global var

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/68>
This commit is contained in:
Flora Cui
2025-05-22 17:18:45 +08:00
committed by Frank Min
parent e98a872650
commit aff8e508df
4 changed files with 7 additions and 47 deletions
+2 -4
View File
@@ -81,10 +81,8 @@ static void clear_after_fork(void) {
}
static inline void init_page_size(void) {
#ifndef PAGE_SIZE
PAGE_SIZE = sysconf(_SC_PAGESIZE);
#endif
PAGE_SHIFT = ffs(PAGE_SIZE) - 1;
dxg_runtime->page_size = sysconf(_SC_PAGESIZE);
dxg_runtime->page_shift = ffs(dxg_runtime->page_size) - 1;
}
static HSAKMT_STATUS init_vars_from_env(void) {