From 3872b5ce321ae9bba50cfaa71da06999b0116b7f Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Wed, 2 Oct 2019 18:30:20 -0400 Subject: [PATCH] libhsakmt: Print an error message when map_mmio failes Without this change, the failure was hard to notice when it happened. Change-Id: I99c3e8cea0d0cbd3bcfe79069410e6e870e225bf Signed-off-by: Yong Zhao [ROCm/ROCR-Runtime commit: 16fa78b1349c4eb23103099bf7188db2d0eb72c6] --- projects/rocr-runtime/src/fmm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/rocr-runtime/src/fmm.c b/projects/rocr-runtime/src/fmm.c index e98bf01c36..43d735af54 100644 --- a/projects/rocr-runtime/src/fmm.c +++ b/projects/rocr-runtime/src/fmm.c @@ -2348,6 +2348,9 @@ HSAKMT_STATUS fmm_init_process_apertures(unsigned int NumNodes) gpu_mem[gpu_mem_id].mmio_aperture.limit = (void *) ((char *)gpu_mem[gpu_mem_id].mmio_aperture.base + PAGE_SIZE - 1); + else + pr_err("Failed to map remapped mmio page on gpu_mem %d\n", + gpu_mem_id); } free(process_apertures);