Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] drm/xe/guc: Prevent compiler read/write optimization breaks
@ 2025-12-18 21:29 Jonathan Cavitt
  2025-12-18 21:29 ` [PATCH v2 1/4] drm/xe/guc: WRITE_ONCE g2h_fence done in g2h_fence_cancel Jonathan Cavitt
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Jonathan Cavitt @ 2025-12-18 21:29 UTC (permalink / raw)
  To: intel-xe
  Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt, matthew.brost,
	daniele.ceraolospurio, rodrigo.vivi, michal.wajdeczko,
	stuart.summers, dixit.ashutosh

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)

Suggested-by: Matthew Brost <matthew.brost@intel.com>
Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Dixit Ashutosh <dixit.ashutosh@intel.com>

Jonathan Cavitt (4):
  drm/xe/guc: WRITE_ONCE g2h_fence done in g2h_fence_cancel
  drm/xe/guc: WRITE_ONCE g2h_fence done in parse_g2h_response
  drm/xe/guc: READ/WRITE_ONCE ct state in ct_change_state and enabled
  drm/xe/guc: READ_ONCE ct state in xe_guc_ct_initialized

 drivers/gpu/drm/xe/xe_guc_ct.c | 14 +++++++++++---
 drivers/gpu/drm/xe/xe_guc_ct.h |  6 ++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-12-20  0:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18 21:29 [PATCH v2 0/4] drm/xe/guc: Prevent compiler read/write optimization breaks Jonathan Cavitt
2025-12-18 21:29 ` [PATCH v2 1/4] drm/xe/guc: WRITE_ONCE g2h_fence done in g2h_fence_cancel Jonathan Cavitt
2025-12-18 21:29 ` [PATCH v2 2/4] drm/xe/guc: WRITE_ONCE g2h_fence done in parse_g2h_response Jonathan Cavitt
2025-12-18 21:29 ` [PATCH v2 3/4] drm/xe/guc: READ/WRITE_ONCE ct state in ct_change_state and enabled Jonathan Cavitt
2025-12-18 21:29 ` [PATCH v2 4/4] drm/xe/guc: READ_ONCE ct state in xe_guc_ct_initialized Jonathan Cavitt
2025-12-18 21:31 ` [PATCH v2 0/4] drm/xe/guc: Prevent compiler read/write optimization breaks Cavitt, Jonathan
2025-12-18 22:17 ` ✓ CI.KUnit: success for " Patchwork
2025-12-18 23:02 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-20  0:24 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox