[PATCH v13 2/4] riscv: Include riscv_set_icache_flush_ctx prctl
Samuel Holland
samuel.holland at sifive.com
Tue Mar 12 16:56:47 PDT 2024
On 2024-03-12 6:53 PM, Charlie Jenkins wrote:
> Support new prctl with key PR_RISCV_SET_ICACHE_FLUSH_CTX to enable
> optimization of cross modifying code. This prctl enables userspace code
> to use icache flushing instructions such as fence.i with the guarantee
> that the icache will continue to be clean after thread migration.
>
> Signed-off-by: Charlie Jenkins <charlie at rivosinc.com>
> Reviewed-by: Atish Patra <atishp at rivosinc.com>
> Reviewed-by: Alexandre Ghiti <alexghiti at rivosinc.com>
> ---
> arch/riscv/include/asm/mmu.h | 2 +
> arch/riscv/include/asm/processor.h | 10 ++++
> arch/riscv/include/asm/switch_to.h | 23 ++++++++
> arch/riscv/mm/cacheflush.c | 111 +++++++++++++++++++++++++++++++++++++
> arch/riscv/mm/context.c | 19 ++++---
> include/uapi/linux/prctl.h | 6 ++
> kernel/sys.c | 6 ++
> 7 files changed, 169 insertions(+), 8 deletions(-)
Thanks for the updates!
Reviewed-by: Samuel Holland <samuel.holland at sifive.com>
More information about the linux-riscv
mailing list