From: Conor Dooley <conor.dooley@microchip.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Mayuresh Chitale <mchitale@ventanamicro.com>,
Rick Chen <rick@andestech.com>, Leo <ycliang@andestech.com>,
Tom Rini <trini@konsulko.com>,
Kongyang Liu <seashell11234455@gmail.com>,
Randolph <randolph@andestech.com>,
Michal Simek <michal.simek@amd.com>,
Yu Chien Peter Lin <peterlin@andestech.com>,
Ben Dooks <ben.dooks@codethink.co.uk>,
Samuel Holland <samuel@sholland.org>,
Dan Carpenter <dan.carpenter@linaro.org>, <u-boot@lists.denx.de>
Subject: Re: [PATCH v1 2/3] riscv: cache: Add CBO instructions
Date: Wed, 21 Aug 2024 10:57:26 +0100 [thread overview]
Message-ID: <20240821-smilingly-lance-c051e89df945@wendy> (raw)
In-Reply-To: <9b9bde7d-e640-4502-831f-be06288fd9d9@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
On Tue, Aug 20, 2024 at 02:14:01PM +0200, Heinrich Schuchardt wrote:
> On 20.08.24 11:37, Mayuresh Chitale wrote:
> > +void riscv_zicbom_init(void)
> > +{
> > + struct udevice *dev;
> > +
> > + if (!CONFIG_IS_ENABLED(RISCV_ISA_ZICBOM))
> > + return;
> > +
> > + uclass_first_device(UCLASS_CPU, &dev);
> > + if (!dev) {
> > + log_err("Failed to get cpu device!\n");
> > + return;
>
> Please, return an error code.
>
> > + }
> > +
> > + (void)dev_read_u32(dev, "riscv,cbom-block-size", &zicbom_block_size);
>
> Please, do not ignore errors.
I'm curious what the policy of U-Boot is w.r.t. extension probing. Is it
okay to enable the option for Zicbom even if your hardware does not
support it, in which case riscv_zicbom_init() would be expected to fail
gracefully and no CMOs done?
Say, for example, you had two very similar chips, one with DMA non-coherent
peripherals and one that only differed by having DMA coherent ones, and you
wanted to run the same U-Boot binary on both devices using a devicetree
passed from firmware.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-08-21 9:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 9:37 [PATCH v1 0/3] Risc-V cache operations Mayuresh Chitale
2024-08-20 9:37 ` [PATCH v1 1/3] riscv: Add support for defining instructions Mayuresh Chitale
2024-08-20 9:37 ` [PATCH v1 2/3] riscv: cache: Add CBO instructions Mayuresh Chitale
2024-08-20 12:14 ` Heinrich Schuchardt
2024-08-21 9:11 ` Mayuresh Chitale
2024-08-21 9:57 ` Conor Dooley [this message]
2024-08-21 10:03 ` Conor.Dooley
2024-08-21 16:04 ` Mayuresh Chitale
2024-08-21 15:57 ` Mayuresh Chitale
2024-08-21 16:09 ` Conor Dooley
2024-08-20 9:37 ` [PATCH v1 3/3] board: qemu-riscv: Override enable_caches Mayuresh Chitale
2024-08-20 12:12 ` Heinrich Schuchardt
2024-08-21 9:11 ` Mayuresh Chitale
2024-08-21 9:21 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240821-smilingly-lance-c051e89df945@wendy \
--to=conor.dooley@microchip.com \
--cc=ben.dooks@codethink.co.uk \
--cc=dan.carpenter@linaro.org \
--cc=mchitale@ventanamicro.com \
--cc=michal.simek@amd.com \
--cc=peterlin@andestech.com \
--cc=randolph@andestech.com \
--cc=rick@andestech.com \
--cc=samuel@sholland.org \
--cc=seashell11234455@gmail.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
--cc=ycliang@andestech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox