Fix a race condition in the trap handler
status.priv may be read after returning from the trap handler, which causes sq_interrupt_word_wave.priv to be 0 even though the s_sendmsg instruction was initiated when status.priv was 1. To work around this, added a s_waitcnt lgkmcnt(0) after s_sendmsg to make sure the message is sent before continuing. Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com> Signed-off-by: Laurent Morichetti <Laurent.Morichetti@amd.com> Change-Id: Ieb75005ca1559ef03d0efac80e966f521e41fcb7
This commit is contained in:
committed by
Jonathan Kim
parent
fc603d58d2
commit
6a82b0a038
@@ -212,6 +212,7 @@ trap_entry:
|
||||
s_mov_b32 m0, ttmp3
|
||||
s_nop 0x0 // Manually inserted wait states
|
||||
s_sendmsg sendmsg(MSG_INTERRUPT)
|
||||
s_waitcnt lgkmcnt(0) // Wait for the message to go out.
|
||||
s_mov_b32 m0, ttmp2
|
||||
|
||||
// Parking the wave requires saving the original pc in the preserved ttmps.
|
||||
|
||||
Reference in New Issue
Block a user