Commit a4dfec06 authored by Mayuresh Chitale's avatar Mayuresh Chitale Committed by Anup Patel
Browse files

riscv: mm: use svinval instructions instead of sfence.vma



When svinval is supported the local_flush_tlb_page*
functions would prefer to use the following sequence
to optimize the tlb flushes instead of a simple sfence.vma:

sfence.w.inval
svinval.vma
  .
  .
svinval.vma
sfence.inval.ir

The maximum number of consecutive svinval.vma instructions
that can be executed in local_flush_tlb_page* functions is
limited to PTRS_PER_PTE. This is required to avoid soft
lockups and the approach is similar to that used in arm64.

Signed-off-by: default avatarMayuresh Chitale <mchitale@ventanamicro.com>
parent 5489a6fe
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment