diff options
author | Jonathan Cavitt <jonathan.cavitt@intel.com> | 2025-09-11 21:06:19 +0000 |
---|---|---|
committer | Kamil Konieczny <kamil.konieczny@linux.intel.com> | 2025-09-15 11:26:58 +0200 |
commit | 3e9a141fdc35b50f3ebdd28b2c0af7fee3501597 (patch) | |
tree | 9cf5498694a42eb001b277b9c6f4df6b0143927f | |
parent | ed51b1517a21b997e4607505628fc54bcdaa5e6f (diff) |
Part of the loop initialized by xe_spin_init writes to the location of
spin->start. This is done to track that the spinner has started
execution, and thus only needs to be performed once. Move this write
before the loop section.
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
-rw-r--r-- | lib/xe/xe_spin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xe/xe_spin.c b/lib/xe/xe_spin.c index 25f7555e2..72b13ef42 100644 --- a/lib/xe/xe_spin.c +++ b/lib/xe/xe_spin.c @@ -69,13 +69,13 @@ void xe_spin_init(struct xe_spin *spin, struct xe_spin_opts *opts) spin->batch[b++] = CS_GPR(START_TS); } - loop_addr = opts->addr + b * sizeof(uint32_t); - spin->batch[b++] = MI_STORE_DWORD_IMM_GEN4; spin->batch[b++] = start_addr; spin->batch[b++] = start_addr >> 32; spin->batch[b++] = 0xc0ffee; + loop_addr = opts->addr + b * sizeof(uint32_t); + if (opts->preempt) spin->batch[b++] = MI_ARB_CHECK; |