Commit c818fea8 authored by Ben Dooks's avatar Ben Dooks Committed by Palmer Dabbelt

riscv: say disabling zicbom if no or bad riscv,cbom-block-size found

If Zicbom is present but there was no riscv,cbom-blocks-size property found
during the cpu feeatures probe, or the cbom-block-size is not valid, then
the extension will be disabled. Make the print explicitly say this is
disabled to ensure that there is no confusion about what is being done.
Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20230317134512.254627-1-ben.dooks@codethink.co.ukSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent d5e45e81
...@@ -75,10 +75,10 @@ static bool riscv_isa_extension_check(int id) ...@@ -75,10 +75,10 @@ static bool riscv_isa_extension_check(int id)
switch (id) { switch (id) {
case RISCV_ISA_EXT_ZICBOM: case RISCV_ISA_EXT_ZICBOM:
if (!riscv_cbom_block_size) { if (!riscv_cbom_block_size) {
pr_err("Zicbom detected in ISA string, but no cbom-block-size found\n"); pr_err("Zicbom detected in ISA string, disabling as no cbom-block-size found\n");
return false; return false;
} else if (!is_power_of_2(riscv_cbom_block_size)) { } else if (!is_power_of_2(riscv_cbom_block_size)) {
pr_err("cbom-block-size present, but is not a power-of-2\n"); pr_err("Zicbom disabled as cbom-block-size present, but is not a power-of-2\n");
return false; return false;
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment