From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com,
jonathan.cavitt@intel.com, matthew.brost@intel.com,
daniele.ceraolospurio@intel.com, rodrigo.vivi@intel.com,
michal.wajdeczko@intel.com, stuart.summers@intel.com,
ashutosh.dixit@intel.com
Subject: [PATCH v3 0/2] drm/xe/guc: Prevent compiler read/write optimization breaks
Date: Mon, 22 Dec 2025 20:19:58 +0000 [thread overview]
Message-ID: <20251222201957.63245-4-jonathan.cavitt@intel.com> (raw)
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
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: Ashutosh Dixit <ashutosh.dixit@intel.com>
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(-)
--
2.43.0
next reply other threads:[~2025-12-22 20:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 20:19 Jonathan Cavitt [this message]
2025-12-22 20:19 ` [PATCH v3 1/2] drm/xe/guc: READ/WRITE_ONCE g2h_fence->done Jonathan Cavitt
2025-12-23 21:36 ` Matthew Brost
2025-12-22 20:20 ` [PATCH v3 2/2] drm/xe/guc: READ/WRITE_ONCE ct->state Jonathan Cavitt
2025-12-23 21:36 ` Matthew Brost
2025-12-23 21:45 ` Rodrigo Vivi
2025-12-23 2:05 ` ✓ CI.KUnit: success for drm/xe/guc: Prevent compiler read/write optimization breaks (rev2) Patchwork
2025-12-23 2:43 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-23 13:20 ` ✓ Xe.CI.Full: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251222201957.63245-4-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=alex.zuo@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=saurabhg.gupta@intel.com \
--cc=stuart.summers@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.