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

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)

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>

Jonathan Cavitt (6):
  drm/xe/xe_guc_ct: WRITE_ONCE g2h_fence done in g2h_fence_cancel
  drm/xe/xe_guc_ct: WRITE_ONCE g2h_fence done in parse_g2h_response
  drm/xe/xe_guc_ct: WRITE_ONCE ct state in guc_ct_change_state
  drm/xe/xe_guc_ct: READ_ONCE ct state in xe_guc_ct_initialized
  drm/xe/xe_guc_ct: READ_ONCE ct state in xe_guc_ct_enabled
  drm/xe/xe_guc_ct: Justify WRITE_ONCE/READ_ONCE usage

 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] 16+ messages in thread

end of thread, other threads:[~2025-12-19 13:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18 15:35 [PATCH 0/6] drm/xe/xe_guc_ct: Prevent compiler read/write optimization breaks Jonathan Cavitt
2025-12-18 15:35 ` [PATCH 1/6] drm/xe/xe_guc_ct: WRITE_ONCE g2h_fence done in g2h_fence_cancel Jonathan Cavitt
2025-12-18 21:08   ` Dixit, Ashutosh
2025-12-18 15:35 ` [PATCH 2/6] drm/xe/xe_guc_ct: WRITE_ONCE g2h_fence done in parse_g2h_response Jonathan Cavitt
2025-12-18 15:35 ` [PATCH 3/6] drm/xe/xe_guc_ct: WRITE_ONCE ct state in guc_ct_change_state Jonathan Cavitt
2025-12-18 15:35 ` [PATCH 4/6] drm/xe/xe_guc_ct: READ_ONCE ct state in xe_guc_ct_initialized Jonathan Cavitt
2025-12-18 15:35 ` [PATCH 5/6] drm/xe/xe_guc_ct: READ_ONCE ct state in xe_guc_ct_enabled Jonathan Cavitt
2025-12-18 15:35 ` [PATCH 6/6] drm/xe/xe_guc_ct: Justify WRITE_ONCE/READ_ONCE usage Jonathan Cavitt
2025-12-18 21:01   ` Dixit, Ashutosh
2025-12-18 21:03     ` Cavitt, Jonathan
2025-12-18 21:10       ` Dixit, Ashutosh
2025-12-18 21:02   ` Rodrigo Vivi
2025-12-18 16:18 ` ✓ CI.KUnit: success for drm/xe/xe_guc_ct: Prevent compiler read/write optimization breaks (rev3) Patchwork
2025-12-18 16:52 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-18 20:59 ` [PATCH 0/6] drm/xe/xe_guc_ct: Prevent compiler read/write optimization breaks Summers, Stuart
2025-12-19 13:38 ` ✓ Xe.CI.Full: success for drm/xe/xe_guc_ct: Prevent compiler read/write optimization breaks (rev3) Patchwork

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