Skip to content

Commit c49bf4f

Browse files
jcornwallAMDalexdeucher
authored andcommitted
drm/amdkfd: Use S_ENDPGM_SAVED in trap handler
This instruction has no functional difference to S_ENDPGM but allows performance counters to track save events correctly. Signed-off-by: Jay Cornwall <jay.cornwall@amd.com> Reviewed-by: Laurent Morichetti <laurent.morichetti@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 961df30 commit c49bf4f

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ static const uint32_t cwsr_trap_gfx9_hex[] = {
674674
0x86ea6a6a, 0x8f6e837a,
675675
0xb96ee0c2, 0xbf800002,
676676
0xb97a0002, 0xbf8a0000,
677-
0xbe801f6c, 0xbf810000,
677+
0xbe801f6c, 0xbf9b0000,
678678
};
679679

680680
static const uint32_t cwsr_trap_nv1x_hex[] = {
@@ -1091,7 +1091,7 @@ static const uint32_t cwsr_trap_nv1x_hex[] = {
10911091
0xb9eef807, 0x876dff6d,
10921092
0x0000ffff, 0x87fe7e7e,
10931093
0x87ea6a6a, 0xb9faf802,
1094-
0xbe80226c, 0xbf810000,
1094+
0xbe80226c, 0xbf9b0000,
10951095
0xbf9f0000, 0xbf9f0000,
10961096
0xbf9f0000, 0xbf9f0000,
10971097
0xbf9f0000, 0x00000000,
@@ -1574,7 +1574,7 @@ static const uint32_t cwsr_trap_arcturus_hex[] = {
15741574
0x86ea6a6a, 0x8f6e837a,
15751575
0xb96ee0c2, 0xbf800002,
15761576
0xb97a0002, 0xbf8a0000,
1577-
0xbe801f6c, 0xbf810000,
1577+
0xbe801f6c, 0xbf9b0000,
15781578
};
15791579

15801580
static const uint32_t cwsr_trap_aldebaran_hex[] = {
@@ -2065,7 +2065,7 @@ static const uint32_t cwsr_trap_aldebaran_hex[] = {
20652065
0x86ea6a6a, 0x8f6e837a,
20662066
0xb96ee0c2, 0xbf800002,
20672067
0xb97a0002, 0xbf8a0000,
2068-
0xbe801f6c, 0xbf810000,
2068+
0xbe801f6c, 0xbf9b0000,
20692069
};
20702070

20712071
static const uint32_t cwsr_trap_gfx10_hex[] = {
@@ -2500,7 +2500,7 @@ static const uint32_t cwsr_trap_gfx10_hex[] = {
25002500
0x876dff6d, 0x0000ffff,
25012501
0x87fe7e7e, 0x87ea6a6a,
25022502
0xb9faf802, 0xbe80226c,
2503-
0xbf810000, 0xbf9f0000,
2503+
0xbf9b0000, 0xbf9f0000,
25042504
0xbf9f0000, 0xbf9f0000,
25052505
0xbf9f0000, 0xbf9f0000,
25062506
};
@@ -2944,7 +2944,7 @@ static const uint32_t cwsr_trap_gfx11_hex[] = {
29442944
0xb8eef802, 0xbf0d866e,
29452945
0xbfa20002, 0xb97af802,
29462946
0xbe80486c, 0xb97af802,
2947-
0xbe804a6c, 0xbfb00000,
2947+
0xbe804a6c, 0xbfb10000,
29482948
0xbf9f0000, 0xbf9f0000,
29492949
0xbf9f0000, 0xbf9f0000,
29502950
0xbf9f0000, 0x00000000,
@@ -3436,5 +3436,5 @@ static const uint32_t cwsr_trap_gfx9_4_3_hex[] = {
34363436
0x86ea6a6a, 0x8f6e837a,
34373437
0xb96ee0c2, 0xbf800002,
34383438
0xb97a0002, 0xbf8a0000,
3439-
0xbe801f6c, 0xbf810000,
3439+
0xbe801f6c, 0xbf9b0000,
34403440
};

drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ L_RETURN_WITHOUT_PRIV:
11041104
s_rfe_b64 s_restore_pc_lo //Return to the main shader program and resume execution
11051105

11061106
L_END_PGM:
1107-
s_endpgm
1107+
s_endpgm_saved
11081108
end
11091109

11101110
function write_hwreg_to_mem(s, s_rsrc, s_mem_offset)

drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ L_RESTORE:
921921
/* the END */
922922
/**************************************************************************/
923923
L_END_PGM:
924-
s_endpgm
924+
s_endpgm_saved
925925

926926
end
927927

0 commit comments

Comments
 (0)