Commit 38fa29dc authored by Matthew Auld's avatar Matthew Auld Committed by Rodrigo Vivi

drm/xe/tlb: drop unnecessary smp_wmb()

wake_up_all() and wait_event_timeout() already have the correct barriers
as per https://www.kernel.org/doc/Documentation/memory-barriers.txt.
This should ensure that the seqno_recv write can't be re-ordered wrt to
the actual wake_up_all() i.e we get woken up but there is no write.  The
reader side with wait_event_timeout() also has the correct barriers.
With that drop the hand rolled smp_wmb(), which is anyway missing some
kind of matching barrier on the reader side.
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent b06d47be
......@@ -333,8 +333,11 @@ int xe_guc_tlb_invalidation_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
expected_seqno, msg[0]);
}
/*
* wake_up_all() and wait_event_timeout() already have the correct
* barriers.
*/
gt->tlb_invalidation.seqno_recv = msg[0];
smp_wmb();
wake_up_all(&guc->ct.wq);
fence = list_first_entry_or_null(&gt->tlb_invalidation.pending_fences,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment