drm/amdkfd: Add CWSR trap handler for GFX13
Subsystems (3)
PATCH v4 1/1 drm/amdkfd: Add CWSR trap handler for GFX13
Add initial trap handler. Implementation provided by Jay Cornwall.
v2: Remove non-GFX13 binary changes
v3: squash in updates
v4: Remove unused sections
Change the interface to the 2nd level trap handler: pass SCC
in ttmp11[22] instead of the entire state_priv register in ttmp12
--- .../gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 570 +++++++++ .../amd/amdkfd/cwsr_trap_handler_gfx13.asm | 1105 +++++++++++++++++ 2 files changed, 1675 insertions(+) create mode 100755 drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx13.asm
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +570 -0
@@ -5994,3 +5994,573 @@ static const uint32_t cwsr_trap_gfx12_1_0_rev_1_hex[] = {0xbf9f0000 ,0xbf9f0000 , 0xbf9f0000, 0xbf9f0000, }; + +static const uint32_t cwsr_trap_gfx13_hex[] = { +0xbf820001 ,0xbf820291 , +0xb0804014 ,0xb96ef803 , +0x876fff6e ,0x00000200 , +0x8f6f8d6f ,0x8a77ff77 , +0x00400000 ,0x88776f77 , +0xb97bf811 ,0xbf0d8e6e , +0xbf840008 ,0x876eff7b , +0x00000080 ,0xbf85001c , +0x876ea07b ,0xbf850047 , +0xbf8e0010 ,0xb97bf811 , +0xbf82fffb ,0x876eff7b , +0x00000bd0 ,0xbf850014 , +0xb96ef812 ,0xbf0d876e , +0xbf840002 ,0xbeee1b87 , +0xbeee1d8a ,0x876f8f7b , +0xbf840002 ,0x886eff6e , +0x00000080 ,0xb96ff813 , +0x876e6e6f ,0xbf850008 , +0x876eff6d ,0xf0000000 , +0xbf850005 ,0x876fff6f , +0x00000200 ,0xbf850002 , +0x876ea07b ,0xbf85002d , +0xbefa4d82 ,0xbfc70000 , +0x8ffa887a ,0xbf0d8f7b , +0xbf840002 ,0x887bff7b , +0xffff0000 ,0xf4601bbd , +0xf8000010 ,0xbfc70000 , +0x8f6e976e ,0x8a77ff77 , +0x00800000 ,0x88776e77 , +0xf4603bbd ,0xf8000000 , +0xbfc70000 ,0xf4603ebd , +0xf8000008 ,0xbfc70000 , +0x87ee6e6e ,0xbf840001 , +0xbe80206e ,0x876eff6d , +0xf0000000 ,0xbf850009 , +0xb96ef811 ,0x876eff6e , +0x00000080 ,0xbf850007 , +0xba800383 ,0x00000001 , +0x80ec886c ,0x82ed806d , +0xbf820002 ,0x806c846c , +0x826d806d ,0x876dff6d , +0x0000ffff ,0x87fe7e7e , +0x87ea6a6a ,0x93eeff77 , +0x00010016 ,0xb9ee0243 , +0xbe80226c ,0xba800151 , +0x00000000 ,0xbefa047e , +0xbefe4d84 ,0xbfc70000 , +0xbeee047e ,0xbefe047a , +0x93faff6f ,0x0002001a , +0x876fff6f ,0x0000ffff , +0x876dff6d ,0x0000ffff , +0x8f7a9e7a ,0x886d7a6d , +0xb97a025b ,0x8f7a9d7a , +0x886d7a6d ,0xb97a0742 , +0x8f7a9c7a ,0x886d7a6d , +0xbf0d9d6d ,0xbf840004 , +0xbf0d9f6d ,0xbf850002 , +0xbefa0380 ,0xbf820008 , +0xb97a3b05 ,0x807a817a , +0x8f7a827a ,0xbf0d9c6d , +0xbf850002 ,0x8f7a877a , +0xbf820001 ,0x8f7a887a , +0x807aff7a ,0x000001c0 , +0x807a6e7a ,0x827b806f , +0xee22007a ,0x380c0000 , +0x00001000 ,0xee22007a , +0x388c0000 ,0x00001400 , +0xee22007a ,0x390c0000 , +0x00001800 ,0xee22007a , +0x398c0000 ,0x00001c00 , +0xee22007a ,0x3a0c0000 , +0x00002000 ,0xee22007a , +0x3a8c0000 ,0x00002400 , +0xee22007a ,0x3b0c0000 , +0x00002800 ,0xee22007a , +0x3b8c0000 ,0x00002c00 , +0xee22007a ,0x3c8c0000 , +0x00003400 ,0xbefb0377 , +0xbf0d9d6d ,0xbf840004 , +0xbf0d9f6d ,0xbf850002 , +0xbefa0380 ,0xbf820008 , +0xb97a3b05 ,0x807a817a , +0x8f7a827a ,0xbf0d9c6d , +0xbf850002 ,0x8f7a877a , +0xbf820001 ,0x8f7a887a , +0x807aff7a ,0x00000200 , +0x80767a6e ,0x8277806f , +0xb97af802 ,0xbf0c8b7a , +0xbf850003 ,0xbe804fc2 , +0xbfabfffe ,0xbf840001 , +0xbe804ec4 ,0xbfabfffc , +0xbefa037d ,0xee220076 , +0x3d0c0000 ,0x00000000 , +0xee220076 ,0x360c0000 , +0x00000400 ,0x877aff6d , +0x0000ffff ,0xee220076 , +0x3d0c0000 ,0x00000800 , +0xbefa037e ,0xee220076 , +0x3d0c0000 ,0x00000c00 , +0xbefa037f ,0xee220076 , +0x3d0c0000 ,0x00001000 , +0xb97af803 ,0x8a7aff7a , +0x00008e00 ,0x93fbff7b , +0x00010016 ,0x8f7b897b , +0x887a7b7a ,0xee220076 , +0x3d0c0000 ,0x00001400 , +0xb97af811 ,0xee220076 , +0x3d0c0000 ,0x00001800 , +0xbefa0380 ,0xee220076 , +0x3d0c0000 ,0x00001c00 , +0xb97af801 ,0xee220076 , +0x3d0c0000 ,0x00002000 , +0xb97af814 ,0xee220076 , +0x3d0c0000 ,0x00002400 , +0xb97af815 ,0xee220076 , +0x3d0c0000 ,0x00002800 , +0xb97af812 ,0xee220076 , +0x3d0c0000 ,0x00002c00 , +0xb97af813 ,0xee220076 , +0x3d0c0000 ,0x00003000 , +0xb97af802 ,0xee220076 , +0x3d0c0000 ,0x00003400 , +0xbefa50c1 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00003800 ,0xbefa4c88 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00003c00 , +0xb97af82c ,0xee220076 , +0x3d0c0000 ,0x00004000 , +0xb97af82d ,0xee220076 , +0x3d0c0000 ,0x00004400 , +0xb97a061c ,0xee220076 , +0x3d0c0000 ,0x00004800 , +0xbf0d9d6d ,0xbf840022 , +0xbefa5680 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00004c00 ,0xb97af82e , +0xee220076 ,0x3d0c0000 , +0x00005000 ,0xbefa4c8c , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00005400 , +0xbefa4c8d ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00005800 ,0xbefa4c8e , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00005c00 , +0xbefa4c8f ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00006000 ,0xbefa4c90 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00006400 , +0xbefa5081 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00008000 ,0xbefa5082 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00008400 , +0xbefa5083 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00008800 ,0xbefa5084 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00008c00 , +0xbefa5085 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00009000 ,0xbefa5086 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00009400 , +0xbefa5087 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x00009800 ,0xbefa5088 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x00009c00 , +0xbefa5089 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x0000a000 ,0xbefa508a , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x0000a400 , +0xbefa508b ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x0000a800 ,0xbefa508c , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x0000ac00 , +0xbefa508d ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x0000b000 ,0xbefa508e , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x0000b400 , +0xbefa508f ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x0000b800 ,0xbefa5090 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x0000bc00 , +0xbefa50a1 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x0000c000 ,0xbefa50a2 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x0000c400 , +0xbefa50a3 ,0xbfc70000 , +0xee220076 ,0x3d0c0000 , +0x0000c800 ,0xbefa50a4 , +0xbfc70000 ,0xee220076 , +0x3d0c0000 ,0x0000cc00 , +0xbf0d9d6d ,0xbf840004 , +0xbf0d9f6d ,0xbf850002 , +0xbefa0380 ,0xbf820008 , +0xb97a3b05 ,0x807a817a , +0x8f7a827a ,0xbf0d9c6d , +0xbf850002 ,0x8f7a877a , +0xbf820001 ,0x8f7a887a , +0x80767a6e ,0x8277806f , +0xbefd0380 ,0x86800100 , +0x86820102 ,0x86840104 , +0x86860106 ,0x86880108 , +0x868a010a ,0x868c010c , +0x868e010e ,0xee220076 , +0x000c0000 ,0x00000000 , +0xee220076 ,0x008c0000 , +0x00000400 ,0xee220076 , +0x010c0000 ,0x00000800 , +0xee220076 ,0x018c0000 , +0x00000c00 ,0xee220076 , +0x020c0000 ,0x00001000 , +0xee220076 ,0x028c0000 , +0x00001400 ,0xee220076 , +0x030c0000 ,0x00001800 , +0xee220076 ,0x038c0000 , +0x00001c00 ,0xee220076 , +0x040c0000 ,0x00002000 , +0xee220076 ,0x048c0000 , +0x00002400 ,0xee220076 , +0x050c0000 ,0x00002800 , +0xee220076 ,0x058c0000 , +0x00002c00 ,0xee220076 , +0x060c0000 ,0x00003000 , +0xee220076 ,0x068c0000 , +0x00003400 ,0xee220076 , +0x070c0000 ,0x00003800 , +0xee220076 ,0x078c0000 , +0x00003c00 ,0x8076c076 , +0x82778077 ,0x807d907d , +0xbf0aff7d ,0x00000060 , +0xbf85ffc2 ,0x86800100 , +0x86820102 ,0x86840104 , +0x86860106 ,0x86880108 , +0x868a010a ,0xee220076 , +0x000c0000 ,0x00000000 , +0xee220076 ,0x008c0000 , +0x00000400 ,0xee220076 , +0x010c0000 ,0x00000800 , +0xee220076 ,0x018c0000 , +0x00000c00 ,0xee220076 , +0x020c0000 ,0x00001000 , +0xee220076 ,0x028c0000 , +0x00001400 ,0xee220076 , +0x030c0000 ,0x00001800 , +0xee220076 ,0x038c0000 , +0x00001c00 ,0xee220076 , +0x040c0000 ,0x00002000 , +0xee220076 ,0x048c0000 , +0x00002400 ,0xee220076 , +0x050c0000 ,0x00002800 , +0xee220076 ,0x058c0000 , +0x00002c00 ,0xb97af802 , +0xbf0d987a ,0xbf85007c , +0x877aff6d ,0xa0000000 , +0xbf06ff7a ,0x20000000 , +0xbf850030 ,0xbef6046e , +0xb97b3b05 ,0x807b817b , +0x8f7b827b ,0xbefa0380 , +0xbefe04c1 ,0xbf9c0000 , +0xbf0d9c6d ,0xbf850014 , +0xbe806f7a ,0xee05c076 , +0x000c0000 ,0x00000000 , +0xee05c076 ,0x008c0000 , +0x00008000 ,0xee05c076 , +0x010c0000 ,0x00010000 , +0xee05c076 ,0x018c0000 , +0x00018000 ,0x8076ff76 , +0x00000200 ,0x82778077 , +0x807a847a ,0xbf0a7b7a , +0xbf85ffed ,0xbf820013 , +0xbe806f7a ,0xee05c076 , +0x000c0000 ,0x00000000 , +0xee05c076 ,0x008c0000 , +0x00010000 ,0xee05c076 , +0x010c0000 ,0x00020000 , +0xee05c076 ,0x018c0000 , +0x00030000 ,0x8076ff76 , +0x00000400 ,0x82778077 , +0x807a847a ,0xbf0a7b7a , +0xbf85ffed ,0xb97b4306 , +0x8f7b8a7b ,0xbf840044 , +0xbf0d9d6d ,0xbf840002 , +0xbe804ec2 ,0xbfabfffe , +0xbf0d9e6d ,0xbf84003e , +0xbf0d9d6d ,0xbf840004 , +0xbf0d9f6d ,0xbf850002 , +0xbefa0380 ,0xbf820008 , +0xb97a3b05 ,0x807a817a , +0x8f7a827a ,0xbf0d9c6d , +0xbf850002 ,0x8f7a877a , +0xbf820001 ,0x8f7a887a , +0x807aff7a ,0x00000400 , +0x80767a6e ,0x8277806f , +0xbefe04c1 ,0xbefa0380 , +0xbf9c0000 ,0xbe806f80 , +0xd7650000 ,0x000100c1 , +0xd7660000 ,0x000200c1 , +0x34000082 ,0xbf0d9c6d , +0xbf850011 ,0xd8d80000 , +0x01000000 ,0xbfc60000 , +0xee05c076 ,0x008c0000 , +0x00000000 ,0x8076ff76 , +0x00000080 ,0x82778077 , +0xd5250000 ,0x0001ff00 , +0x00000080 ,0x807aff7a , +0x00000080 ,0xbf0a7b7a , +0xbf85fff0 ,0xbf820010 , +0xd8d80000 ,0x01000000 , +0xbfc60000 ,0xee05c076 , +0x008c0000 ,0x00000000 , +0x8076ff76 ,0x00000100 , +0x82778077 ,0xd5250000 , +0x0001ff00 ,0x00000100 , +0x807aff7a ,0x00000100 , +0xbf0a7b7a ,0xbf85fff0 , +0xb97af802 ,0xbf0c8b7a , +0xbf850003 ,0xbe804fc2 , +0xbfabfffe ,0xbf840001 , +0xbe804ec4 ,0xbfabfffc , +0xbf9b0000 ,0xbef4047e , +0x93eeff75 ,0x0002001a , +0x8775ff75 ,0x0000ffff , +0x8f729e6e ,0xb96e025b , +0x8f6e9d6e ,0x88726e72 , +0xb96e0742 ,0x8f6e9c6e , +0x88726e72 ,0xbf0d9d72 , +0xbf840004 ,0xbf0d9f72 , +0xbf850002 ,0xbeee0380 , +0xbf820008 ,0xb96e3b05 , +0x806e816e ,0x8f6e826e , +0xbf0d9c72 ,0xbf850002 , +0x8f6e876e ,0xbf820001 , +0x8f6e886e ,0x806eff6e , +0x00000200 ,0x80766e74 , +0x82778075 ,0xf4601bbb , +0xf8000034 ,0xbfc70000 , +0xbf0d986e ,0xbf840002 , +0xbf900003 ,0xbf82007d , +0xb96f4306 ,0x8f6f8a6f , +0xbf840044 ,0xbf0d9e72 , +0xbf84003e ,0xbf0d9d72 , +0xbf840004 ,0xbf0d9f72 , +0xbf850002 ,0xbeee0380 , +0xbf820008 ,0xb96e3b05 , +0x806e816e ,0x8f6e826e , +0xbf0d9c72 ,0xbf850002 , +0x8f6e876e ,0xbf820001 , +0x8f6e886e ,0x806eff6e , +0x00000400 ,0x80766e74 , +0x82778075 ,0xbefe04c1 , +0xbeee0380 ,0xd7650000 , +0x000100c1 ,0xd7660000 , +0x000200c1 ,0x34000082 , +0xbf0d9c72 ,0xbf850012 , +0xee058076 ,0x000c0001 , +0x00000000 ,0xbfc00000 , +0xd8340000 ,0x00000100 , +0x8076ff76 ,0x00000080 , +0x82778077 ,0xd5250000 , +0x0001ff00 ,0x00000080 , +0x806eff6e ,0x00000080 , +0xbf0a6f6e ,0xbf85fff0 , +0xbfc60000 ,0xbf820011 , +0xee058076 ,0x000c0001 , +0x00000000 ,0xbfc00000 , +0xd8340000 ,0x00000100 , +0x8076ff76 ,0x00000100 , +0x82778077 ,0xd5250000 , +0x0001ff00 ,0x00000100 , +0x806eff6e ,0x00000100 , +0xbf0a6f6e ,0xbf85fff0 , +0xbfc60000 ,0xbf0d9d72 , +0xbf840002 ,0xbe804ec2 , +0xbfabfffe ,0x876eff72 , +0xa0000000 ,0xbf06ff6e , +0x20000000 ,0xbf850031 , +0xbef60474 ,0xb96f3b05 , +0x806f816f ,0x8f6f826f , +0xbeee0380 ,0xbefe04c1 , +0xbf0d9c72 ,0xbf850015 , +0xbe806f6e ,0xee058076 , +0x000c0000 ,0x00000000 , +0xee058076 ,0x000c0001 , +0x00008000 ,0xee058076 , +0x000c0002 ,0x00010000 , +0xee058076 ,0x000c0003 , +0x00018000 ,0x8076ff76 , +0x00000200 ,0x82778077 , +0x806e846e ,0xbf0a6f6e , +0xbf85ffed ,0xbfc00000 , +0xbf820014 ,0xbe806f6e , +0xee058076 ,0x000c0000 , +0x00000000 ,0xee058076 , +0x000c0001 ,0x00010000 , +0xee058076 ,0x000c0002 , +0x00020000 ,0xee058076 , +0x000c0003 ,0x00030000 , +0x8076ff76 ,0x00000400 , +0x82778077 ,0x806e846e , +0xbf0a6f6e ,0xbf85ffed , +0xbfc00000 ,0xbf0d9d72 , +0xbf840004 ,0xbf0d9f72 , +0xbf850002 ,0xbeee0380 , +0xbf820008 ,0xb96e3b05 , +0x806e816e ,0x8f6e826e , +0xbf0d9c72 ,0xbf850002 , +0x8f6e876e ,0xbf820001 , +0x8f6e886e ,0x80766e74 , +0x82778075 ,0xbeee03ff , +0x000001a0 ,0xf460403b , +0xdc000000 ,0xbfc70000 , +0xbefd03ff ,0x00680000 , +0x86801000 ,0x86821002 , +0x80eea06e ,0xf460603b , +0xdc000000 ,0xbfc70000 , +0x80fdff7d ,0x00080000 , +0x86801000 ,0x86821002 , +0x86841004 ,0x86861006 , +0x80eec06e ,0xf460803b , +0xdc000000 ,0xbfc70000 , +0x80fdff7d ,0x00100000 , +0x86801000 ,0x86821002 , +0x86841004 ,0x86861006 , +0x86881008 ,0x868a100a , +0x868c100c ,0x868e100e , +0xbf06807d ,0xbf84fff0 , +0xba80f801 ,0x00000000 , +0xbf0d9d72 ,0xbf840004 , +0xbf0d9f72 ,0xbf850002 , +0xbeee0380 ,0xbf820008 , +0xb96e3b05 ,0x806e816e , +0x8f6e826e ,0xbf0d9c72 , +0xbf850002 ,0x8f6e876e , +0xbf820001 ,0x8f6e886e , +0x806eff6e ,0x00000200 , +0x80766e74 ,0x82778075 , +0xf4601bfb ,0xf8000000 , +0xf4601b3b ,0xf8000004 , +0xf4601b7b ,0xf8000008 , +0xf4601c3b ,0xf800000c , +0xf4601c7b ,0xf8000010 , +0xf4601ebb ,0xf8000014 , +0xf4601efb ,0xf8000018 , +0xf4601cfb ,0xf8000020 , +0xf4601bbb ,0xf8000024 , +0xbfc70000 ,0xb9eef814 , +0xf4601bbb ,0xf8000028 , +0xbfc70000 ,0xb9eef815 , +0xf4601bbb ,0xf800002c , +0xbfc70000 ,0xb9eef812 , +0xf4601bbb ,0xf8000030 , +0xbfc70000 ,0xb9eef813 , +0xf4601bbb ,0xf8000040 , +0xbfc70000 ,0xb9eef82c , +0xf4601bbb ,0xf8000044 , +0xbfc70000 ,0xb9eef82d , +0xf4601bbb ,0xf8000048 , +0xbfc70000 ,0xbf06816e , +0xbf840003 ,0xbefd0381 , +0xbefc4c8a ,0xbfc70000 , +0xb96ef802 ,0xbf0c8b6e , +0xbf850003 ,0xbe804fc2 , +0xbfabfffe ,0xbf840001 , +0xbe804ec4 ,0xbfabfffc , +0xbf0d9e72 ,0xbf84001c , +0xf4601bbb ,0xf8000038 , +0xbfc70000 ,0xbf0d9f6e , +0xbf840017 ,0x93eeff6e , +0x00080016 ,0x876e6e6e , +0xbf840003 ,0xbe804ec1 , +0x816ec16e ,0xbf82fffb , +0xbef803ff ,0x00000080 , +0xbefd0381 ,0xf4601bbb , +0xf0000000 ,0xbfc70000 , +0xbf0c9f6e ,0xbf850008 , +0x887d6e7d ,0xbe80517d , +0x80788478 ,0x877dff7d , +0x0000007f ,0x807d817d , +0xbf08907d ,0xbf84fff3 , +0xf4601bbb ,0xf800003c , +0xbfc70000 ,0xbf0d9f6e , +0xbf84001d ,0xbf0d9e72 , +0xbf840002 ,0xbf068180 , +0xbe804fc4 ,0xbfabfffc , +0xbf840017 ,0x93eeff6e , +0x00080016 ,0x876e6e6e , +0xbf840003 ,0xbe804ec3 , +0x816ec16e ,0xbf82fffb , +0xbef803ff ,0x000000c0 , +0xbefd03a1 ,0xf4601bbb , +0xf0000000 ,0xbfc70000 , +0xbf0c9f6e ,0xbf850008 , +0x887d6e7d ,0xbe80517d , +0x80788478 ,0x877dff7d , +0x0000007f ,0x807d817d , +0xbf08a47d ,0xbf84fff3 , +0xbf0d9d72 ,0xbf840040 , +0xf4601bbb ,0xf800004c , +0xbfc70000 ,0xbf06806e , +0xbf850005 ,0xbefd136e , +0xbe80547d ,0xbfc70000 , +0xbeee1b7d ,0xbf82fff9 , +0xf4601bbb ,0xf8000050 , +0xbfc70000 ,0xb9eef82e , +0xf4601bbb ,0xf8000054 , +0xbfc70000 ,0xbf0d9c6e , +0xbf850003 ,0xb9eef824 , +0x807c8080 ,0xbf820002 , +0xb9eef824 ,0xbf800000 , +0xf4601bbb ,0xf8000058 , +0xbfc70000 ,0xbf0d9c6e , +0xbf850003 ,0xb9eef825 , +0x807c8080 ,0xbf820002 , +0xb9eef825 ,0xbf800000 , +0xf4601bbb ,0xf800005c , +0xbfc70000 ,0xbf0d9c6e , +0xbf850003 ,0xb9eef826 , +0x807c8080 ,0xbf820002 , +0xb9eef826 ,0xbf800000 , +0xf4601bbb ,0xf8000060 , +0xbfc70000 ,0xbf0d9c6e , +0xbf850003 ,0xb9eef827 , +0x807c8080 ,0xbf820002 , +0xb9eef827 ,0xbf800000 , +0xf4601bbb ,0xf8000064 , +0xbfc70000 ,0xbf0d9c6e , +0xbf850003 ,0xb9eef828 , +0x807c8080 ,0xbf820002 , +0xb9eef828 ,0xbf800000 , +0xbefd036f ,0xbefe0370 , +0xbeff0371 ,0xb9fb2011 , +0x907b867b ,0xb9fb0191 , +0x907b827b ,0xb9fbba11 , +0xb9f3f801 ,0xbf0d9d72 , +0xbf840004 ,0xbf0d9f72 , +0xbf850002 ,0xbeee0380 , +0xbf820008 ,0xb96e3b05 , +0x806e816e ,0x8f6e826e , +0xbf0d9c72 ,0xbf850002 , +0x8f6e876e ,0xbf820001 , +0x8f6e886e ,0x806eff6e , +0x000001c0 ,0x806e746e , +0x826f8075 ,0xf4605c37 , +0xf8000010 ,0xf4605d37 , +0xf8000020 ,0xf4601e77 , +0xf8000034 ,0xbfc70000 , +0x876dff6d ,0x0000ffff , +0x87fe7e7e ,0x87ea6a6a , +0xb9faf803 ,0xb96ef802 , +0xbf0c8b6e ,0xbf850003 , +0xbe804fc2 ,0xbfabfffe , +0xbf840001 ,0xbe804ec4 , +0xbfabfffc ,0x907a897a , +0xb9fa0243 ,0xbe80226c , +0xbf9f0000 ,0xbf9f0000 , +0xbf9f0000 ,0xbf9f0000 , +0xbf9f0000 ,0x00000000 , +};
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx13.asm new file +1105 -0
1,105 lines not on this page · raw message
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] drm/amdkfd: unused cwsr_trap_gfx13_hex triggers -Wunused-const-variable --
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [High] drm/amdkfd: unused cwsr_trap_gfx13_hex triggers -Wunused-const-variable
--
commit 2e64101d36eee8890b942dff02c7d421f5a71ffe
Author: Lancelot SIX <[email protected]>
drm/amdkfd: Add CWSR trap handler for GFX13
This commit adds the GFX13 CWSR trap handler assembly source and its compiled hex array in cwsr_trap_handler.h.
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h static const uint32_t cwsr_trap_gfx12_1_0_rev_1_hex[] = { · line 5998
Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +2
-0@@ -5994,3 +5994,573 @@ static const uint32_t cwsr_trap_gfx12_1_0_rev_1_hex[] = {0xbf9f0000 ,0xbf9f0000 , 0xbf9f0000, 0xbf9f0000, }; + +static const uint32_t cwsr_trap_gfx13_hex[] = {
[Severity: High]
Does defining cwsr_trap_gfx13_hex without referencing it in kfd_cwsr_init() trigger a -Wunused-const-variable warning when building kfd_device.c?
drivers/gpu/drm/Makefile unconditionally enables -Wunused-const-variable, and cwsr_trap_handler.h is only included by kfd_device.c, where kfd_cwsr_init() has no branch selecting cwsr_trap_gfx13_hex:
drivers/gpu/drm/amd/amdkfd/kfd_device.c:kfd_cwsr_init() {
...
} else if (KFD_GC_VERSION(kfd) == IP_VERSION(12, 1, 0) &&
(kfd->adev->rev_id & 0xF) == 0) {
BUILD_BUG_ON(sizeof(cwsr_trap_gfx12_1_0_rev_0_hex)
> KFD_CWSR_TMA_OFFSET);
kfd->cwsr_isa = cwsr_trap_gfx12_1_0_rev_0_hex;
kfd->cwsr_isa_size = sizeof(cwsr_trap_gfx12_1_0_rev_0_hex);
} else {
BUILD_BUG_ON(sizeof(cwsr_trap_gfx12_1_0_rev_1_hex)
> KFD_CWSR_TMA_OFFSET);
kfd->cwsr_isa = cwsr_trap_gfx12_1_0_rev_1_hex;
kfd->cwsr_isa_size = sizeof(cwsr_trap_gfx12_1_0_rev_1_hex);
}
}With CONFIG_WERROR, CONFIG_DRM_WERROR, or CONFIG_DRM_AMDGPU_WERROR enabled, this breaks the build, and GFX13 devices will fall through to cwsr_trap_gfx12_1_0_rev_1_hex unless wired up in kfd_cwsr_init() (or marked __maybe_unused if wired up in a later patch).
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1