Skip to content

Commit 31ca5d4

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: errata: thead: only set cbom size & noncoherent during boot
The CBOM size and whether the HW is noncoherent is known and determined during booting and won't change after that. Signed-off-by: Jisheng Zhang <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent ac9a786 commit 31ca5d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arch/riscv/errata/thead/errata.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ static bool errata_probe_cmo(unsigned int stage,
4545
if (stage == RISCV_ALTERNATIVES_EARLY_BOOT)
4646
return false;
4747

48-
riscv_cbom_block_size = L1_CACHE_BYTES;
49-
riscv_noncoherent_supported();
48+
if (stage == RISCV_ALTERNATIVES_BOOT) {
49+
riscv_cbom_block_size = L1_CACHE_BYTES;
50+
riscv_noncoherent_supported();
51+
}
52+
5053
return true;
5154
}
5255

0 commit comments

Comments
 (0)