diff options
| author | Guo Ren <[email protected]> | 2025-04-21 14:24:41 +0000 |
|---|---|---|
| committer | Palmer Dabbelt <[email protected]> | 2025-06-05 18:09:39 +0000 |
| commit | eb87e56d651d0a72009842bc0d8eeae7b605c97d (patch) | |
| tree | a2b81060b56dd0c2d93eb9c52320157a22d4f79b /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | |
| parent | riscv: Add ARCH_HAS_PREFETCH[W] support with Zicbop (diff) | |
| download | kernel-eb87e56d651d0a72009842bc0d8eeae7b605c97d.tar.gz kernel-eb87e56d651d0a72009842bc0d8eeae7b605c97d.zip | |
riscv: xchg: Prefetch the destination word for sc.w
The cost of changing a cacheline from shared to exclusive state can be
significant, especially when this is triggered by an exclusive store,
since it may result in having to retry the transaction.
This patch makes use of prefetch.w to prefetch cachelines for write
prior to lr/sc loops when using the xchg_small atomic routine.
This patch is inspired by commit 0ea366f5e1b6 ("arm64: atomics:
prefetch the destination word for write prior to stxr").
Signed-off-by: Guo Ren <[email protected]>
Signed-off-by: Guo Ren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Andrea Parri <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Ghiti <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
0 files changed, 0 insertions, 0 deletions
