]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
riscv: remove log_debug() in enable_caches()
authorCharles Perry <charles.perry@microchip.com>
Mon, 22 Jun 2026 19:43:07 +0000 (12:43 -0700)
committerLeo Yu-Chi Liang <leo.liang@sifive.com>
Mon, 27 Jul 2026 02:39:22 +0000 (19:39 -0700)
log_debug() cannot be used before log_init() has been called. Remove the
log_debug() statement in enable_caches() since it is called before
log_init() in initcall_run_r().

This fixes a bug where a RISC-V system which does not have the "zicbom"
extension (such as PIC64-HPSC/HX) would get lost in an infinite loop in
log_dispatch().

Fixes: 9e859849e2ca ("riscv: cache: Add CBO instructions")
Signed-off-by: Charles Perry <charles.perry@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <leo.liang@sifive.com>
arch/riscv/lib/cache.c

index 31aa30bc7d723ade3b337d8bc5a13ada89fe1da4..ac5136fa6becc3eacc4b31a64134674862ef42c3 100644 (file)
@@ -149,8 +149,6 @@ __weak int dcache_status(void)
 __weak void enable_caches(void)
 {
        zicbom_block_size = riscv_get_cbom_block_size();
-       if (!zicbom_block_size)
-               log_debug("Zicbom not initialized.\n");
 }
 
 int __weak pgprot_set_attrs(phys_addr_t addr, size_t size, enum pgprot_attrs perm)