diff options
| author | Andrea Parri <[email protected]> | 2024-01-31 14:49:36 +0000 |
|---|---|---|
| committer | Palmer Dabbelt <[email protected]> | 2024-02-15 16:04:14 +0000 |
| commit | cd9b29014dc69609489261efe351d0c7709ae8bf (patch) | |
| tree | 0af8570de35f1c6b075dd7e53835fe0ffc5e379b /scripts/bpf_doc.py | |
| parent | locking: Introduce prepare_sync_core_cmd() (diff) | |
| download | kernel-cd9b29014dc69609489261efe351d0c7709ae8bf.tar.gz kernel-cd9b29014dc69609489261efe351d0c7709ae8bf.zip | |
membarrier: riscv: Provide core serializing command
RISC-V uses xRET instructions on return from interrupt and to go back
to user-space; the xRET instruction is not core serializing.
Use FENCE.I for providing core serialization as follows:
- by calling sync_core_before_usermode() on return from interrupt (cf.
ipi_sync_core()),
- via switch_mm() and sync_core_before_usermode() (respectively, for
uthread->uthread and kthread->uthread transitions) before returning
to user-space.
On RISC-V, the serialization in switch_mm() is activated by resetting
the icache_stale_mask of the mm at prepare_sync_core_cmd().
Suggested-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Andrea Parri <[email protected]>
Reviewed-by: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions
