]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: Weakly define invalidate_icache_range()
authorSamuel Holland <samuel@sholland.org>
Tue, 31 Oct 2023 05:37:20 +0000 (00:37 -0500)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 2 Nov 2023 07:15:54 +0000 (15:15 +0800)
Some RISC-V CPUs, such as the T-HEAD XuanTie series, have a
vendor-specific way to invalidate a portion of the instruction cache.
Allow them to override invalidate_icache_range().

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/lib/cache.c

index c46b49eb0ac635b54be26938a23efe6e011b7aa2..afad7e117f32e8c03db8359ed2be131f14d163bd 100644 (file)
@@ -19,7 +19,7 @@ __weak void flush_dcache_range(unsigned long start, unsigned long end)
 {
 }
 
-void invalidate_icache_range(unsigned long start, unsigned long end)
+__weak void invalidate_icache_range(unsigned long start, unsigned long end)
 {
        /*
         * RISC-V does not have an instruction for invalidating parts of the