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

Conor Dooley conor at kernel.org
Fri Mar 17 06:55:54 PDT 2023


On Fri, Mar 17, 2023 at 01:45:12PM +0000, Ben Dooks wrote:
> 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.
>

Being explicit seems like a good idea,
Reviewed-by: Conor Dooley <conor.dooley at microchip.com>

Thanks,
Conor.

> Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>
> ---
>  arch/riscv/kernel/cpufeature.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
> index 59d58ee0f68d..c8b883827840 100644
> --- a/arch/riscv/kernel/cpufeature.c
> +++ b/arch/riscv/kernel/cpufeature.c
> @@ -72,10 +72,10 @@ static bool riscv_isa_extension_check(int id)
>  	switch (id) {
>  	case RISCV_ISA_EXT_ZICBOM:
>  		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;
>  		} 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 true;
> -- 
> 2.39.2
> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20230317/81f29b7b/attachment.sig>


More information about the linux-riscv mailing list