8374056: RISC-V: Fix argument passing for the RiscvFlushIcache::flush

Reviewed-by: fyang, rehn
This commit is contained in:
ikarostsin 2026-02-09 07:41:20 +00:00 committed by Fei Yang
parent ffb6279c88
commit dc80ce7aec

View File

@ -39,7 +39,8 @@ static int icache_flush(address addr, int lines, int magic) {
// We need to make sure stores happens before the I/D cache synchronization.
__asm__ volatile("fence rw, rw" : : : "memory");
RiscvFlushIcache::flush((uintptr_t)addr, ((uintptr_t)lines) << ICache::log2_line_size);
uintptr_t end = (uintptr_t)addr + ((uintptr_t)lines << ICache::log2_line_size);
RiscvFlushIcache::flush((uintptr_t)addr, end);
return magic;
}