linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: Fix wrong size passed to local_flush_tlb_range_asid()
@ 2024-01-23 13:27 Alexandre Ghiti
  2024-01-24  2:44 ` [External] " yunhui cui
  2024-01-29  9:01 ` Dennis Zhou
  0 siblings, 2 replies; 11+ messages in thread
From: Alexandre Ghiti @ 2024-01-23 13:27 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Geert Uytterhoeven,
	Alexandre Ghiti, Dennis Zhou, linux-riscv, linux-kernel

local_flush_tlb_range_asid() takes the size as argument, not the end of
the range to flush, so fix this by computing the size from the end and
the start of the range.

Fixes: 7a92fc8b4d20 ("mm: Introduce flush_cache_vmap_early()")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
 arch/riscv/mm/tlbflush.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c
index 8d12b26f5ac3..9619965f6501 100644
--- a/arch/riscv/mm/tlbflush.c
+++ b/arch/riscv/mm/tlbflush.c
@@ -68,7 +68,7 @@ static inline void local_flush_tlb_range_asid(unsigned long start,
 
 void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
 {
-	local_flush_tlb_range_asid(start, end, PAGE_SIZE, FLUSH_TLB_NO_ASID);
+	local_flush_tlb_range_asid(start, end - start, PAGE_SIZE, FLUSH_TLB_NO_ASID);
 }
 
 static void __ipi_flush_tlb_all(void *info)
-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-02-09 16:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23 13:27 [PATCH] riscv: Fix wrong size passed to local_flush_tlb_range_asid() Alexandre Ghiti
2024-01-24  2:44 ` [External] " yunhui cui
2024-01-24  8:19   ` Dennis Zhou
2024-01-24  8:38     ` Alexandre Ghiti
2024-01-24  8:41       ` Alexandre Ghiti
2024-01-29  1:43         ` yunhui cui
2024-01-29  9:01 ` Dennis Zhou
2024-01-29  9:04   ` Alexandre Ghiti
2024-01-31 20:34   ` Palmer Dabbelt
2024-02-01  3:45     ` Dennis Zhou
2024-02-09 16:41       ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).