Commit 6efb16b1 authored by Atish Patra's avatar Atish Patra Committed by Paul Walmsley
Browse files

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: default avatarAtish Patra <atish.patra@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
parent 31738ede
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@ static void __sbi_tlb_flush_range(struct cpumask *cmask, unsigned long start,

	if (cpumask_any_but(cmask, cpuid) >= nr_cpu_ids) {
		/* local cpu is the only cpu present in cpumask */
		if (size <= PAGE_SIZE)
			local_flush_tlb_page(start);
		else
			local_flush_tlb_all();
	} else {
		riscv_cpuid_to_hartid_mask(cmask, &hmask);