mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
RISC-V: Issue a tlb page flush if possible
If tlbflush request is for page only, there is no need to do a complete local tlb shootdown. Just do a local tlb flush for the given address. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
This commit is contained in:
parent
31738ede9b
commit
6efb16b1d5
@ -27,7 +27,10 @@ static void __sbi_tlb_flush_range(struct cpumask *cmask, unsigned long start,
|
|||||||
|
|
||||||
if (cpumask_any_but(cmask, cpuid) >= nr_cpu_ids) {
|
if (cpumask_any_but(cmask, cpuid) >= nr_cpu_ids) {
|
||||||
/* local cpu is the only cpu present in cpumask */
|
/* local cpu is the only cpu present in cpumask */
|
||||||
local_flush_tlb_all();
|
if (size <= PAGE_SIZE)
|
||||||
|
local_flush_tlb_page(start);
|
||||||
|
else
|
||||||
|
local_flush_tlb_all();
|
||||||
} else {
|
} else {
|
||||||
riscv_cpuid_to_hartid_mask(cmask, &hmask);
|
riscv_cpuid_to_hartid_mask(cmask, &hmask);
|
||||||
sbi_remote_sfence_vma(cpumask_bits(&hmask), start, size);
|
sbi_remote_sfence_vma(cpumask_bits(&hmask), start, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user