Skip to content

drm/xe/guc: Prevent compiler read/write optimization breaks

Jonathan Cavitt intel-xe 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesIn review
  2. v24 patches 1 replySuperseded
  3. v16 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Split into multiple patches (Rodrigo Vivi)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe/guc: READ/WRITE_ONCE g2h_fence->donedrivers/gpu/drm/xe/xe_guc_ct.c+10 -41 reply
2/2drm/xe/guc: READ/WRITE_ONCE ct->statedrivers/gpu/drm/xe/xe_guc_ct.c drivers/gpu/drm/xe/xe_guc_ct.h+10 -32 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMatthew Brost
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] drm/xe/guc: Prevent compiler read/write optimization breaks

Use READ_ONCE and WRITE_ONCE when operating on ct->state and the g2h_fence->done values to prevent the compiler from ignoring these necessary operations.

v2: (Matt Brost)
- Add Fixes tags
- Add comments

v3:
- Split into multiple patches (Rodrigo Vivi)

v4:
- s/xe_guc_ct/guc (Michal W)
- Add comments with READ_ONCE and WRITE_ONCE updates (Rodrigo, Stuart, Dixit)
- Squash patches with same Fixes target
(Rodrigo, Stuart, Dixit)
- Add partial comment justifying WRITE_ONCE in guc_ct_change_state before READ_ONCE in xe_guc_ct_enabled is added (Rodrigo Vivi)
- Update above comment when adding READ_ONCE to xe_guc_ct_enabled (jcavitt)

v4: (Matt Brost)
- Squash patches operating on the same value together
- Remove unnecessary Fixes tags
- Add READ_ONCEs to pair with WRITE_ONCEs on g2h_fence->done

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Michal Wajdeczko <[email protected]>
Cc Stuart Summers <[email protected]>
Cc Ashutosh Dixit <[email protected]>

Jonathan Cavitt (2):
drm/xe/guc: READ/WRITE_ONCE g2h_fence->done
drm/xe/guc: READ/WRITE_ONCE ct->state

 drivers/gpu/drm/xe/xe_guc_ct.c | 21 ++++++++++++++++-----
 drivers/gpu/drm/xe/xe_guc_ct.h |  6 ++++--
 2 files changed, 20 insertions(+), 7 deletions(-)
Signature · 1 line
2.43.0