From ef1955ad42ea629e2a8d646629896b36034453e5 Mon Sep 17 00:00:00 2001 From: Laurent Morichetti Date: Sat, 26 Jun 2021 09:50:34 -0700 Subject: [PATCH] Fix incorrect packet index in ttmp6 ttmp6.packet_index is reported as 0 for all waves, regardless of the dispatch packet position in the queue, due to an issue in the clearing of the previous trap_id and saved status.halt bit. Fixed TTMP6_SAVED_STATUS_HALT_MASK to only be one bit, 1<<29. Change-Id: Ia4934e51123a40d71de658efc387a1f3a6344f05 --- runtime/hsa-runtime/core/inc/amd_gpu_shaders.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/hsa-runtime/core/inc/amd_gpu_shaders.h b/runtime/hsa-runtime/core/inc/amd_gpu_shaders.h index 30937bca23..e5ee1c4eda 100644 --- a/runtime/hsa-runtime/core/inc/amd_gpu_shaders.h +++ b/runtime/hsa-runtime/core/inc/amd_gpu_shaders.h @@ -645,7 +645,7 @@ static const unsigned int kCodeTrapHandler10[] = { .set TTMP6_WAVE_STOPPED_SHIFT , 30 .set TTMP6_SAVED_STATUS_HALT_SHIFT , 29 -.set TTMP6_SAVED_STATUS_HALT_MASK , ((1 << TTMP6_SAVED_STATUS_HALT_SHIFT) - 1) +.set TTMP6_SAVED_STATUS_HALT_MASK , (1 << TTMP6_SAVED_STATUS_HALT_SHIFT) .set TTMP6_SAVED_TRAP_ID_SHIFT , 25 .set TTMP6_SAVED_TRAP_ID_SIZE , 4 .set TTMP6_SAVED_TRAP_ID_MASK , (((1 << TTMP6_SAVED_TRAP_ID_SIZE) - 1) << TTMP6_SAVED_TRAP_ID_SHIFT) @@ -841,7 +841,7 @@ trap_entry: static const unsigned int kCodeTrapHandlerV2_9[] = { 0x92eeff6d, 0x00080010, 0xbf840009, 0xbf0d986d, 0xbf850002, 0x806c846c, 0x826d806d, 0xbf06836e, 0xbf840003, 0xbf0c9777, 0xbf840001, 0xbf82004c, - 0x8972ff72, 0x1fffffff, 0x83ee8f6e, 0x8e6e996e, 0x87726e72, 0x92eeff78, + 0x8972ff72, 0x3e000000, 0x83ee8f6e, 0x8e6e996e, 0x87726e72, 0x92eeff78, 0x0001000d, 0x8e6e9d6e, 0x87726e72, 0xbeee007e, 0xbeef007f, 0xbefe00ff, 0x80000000, 0xbf90000a, 0xbf800007, 0xbf0c9f7e, 0xbf84fffd, 0xbeff006f, 0x866fff7e, 0x000003ff, 0xbefe006e, 0xb8eef803, 0xbf0d9c6e, 0xbf840003, @@ -860,7 +860,7 @@ static const unsigned int kCodeTrapHandlerV2_9[] = { static const unsigned int kCodeTrapHandlerV2_1010[] = { 0x93eeff6d, 0x00080010, 0xbf840009, 0xbf0d986d, 0xbf850002, 0x806c846c, 0x826d806d, 0xbf06836e, 0xbf840003, 0xbf0c9777, 0xbf840001, 0xbf82004c, - 0x8a72ff72, 0x1fffffff, 0x83ee8f6e, 0x8f6e996e, 0x88726e72, 0x93eeff78, + 0x8a72ff72, 0x3e000000, 0x83ee8f6e, 0x8f6e996e, 0x88726e72, 0x93eeff78, 0x0001000d, 0x8f6e9d6e, 0x88726e72, 0xbeee037e, 0xbeef037f, 0xbefe03ff, 0x80000000, 0xbf90000a, 0xbf800007, 0xbf0c9f7e, 0xbf84fffd, 0xbeff036f, 0x876fff7e, 0x000003ff, 0xbefe036e, 0xb96ef803, 0xbf0d9c6e, 0xbf840003, @@ -880,7 +880,7 @@ static const unsigned int kCodeTrapHandlerV2_1010[] = { static const unsigned int kCodeTrapHandlerV2_10[] = { 0x93eeff6d, 0x00080010, 0xbf840009, 0xbf0d986d, 0xbf850002, 0x806c846c, 0x826d806d, 0xbf06836e, 0xbf840003, 0xbf0c9777, 0xbf840001, 0xbf82003f, - 0x8a72ff72, 0x1fffffff, 0x83ee8f6e, 0x8f6e996e, 0x88726e72, 0x93eeff78, + 0x8a72ff72, 0x3e000000, 0x83ee8f6e, 0x8f6e996e, 0x88726e72, 0x93eeff78, 0x0001000d, 0x8f6e9d6e, 0x88726e72, 0xbeee037e, 0xbeef037f, 0xbefe03ff, 0x80000000, 0xbf90000a, 0xbf800007, 0xbf0c9f7e, 0xbf84fffd, 0xbeff036f, 0x876fff7e, 0x000003ff, 0xbefe036e, 0xb96ef803, 0xbf0d9c6e, 0xbf840003,