From: <Conor.Dooley@microchip.com>
To: <xypron.glpk@gmx.de>
Cc: <mchitale@ventanamicro.com>, <rick@andestech.com>,
<ycliang@andestech.com>, <trini@konsulko.com>,
<seashell11234455@gmail.com>, <randolph@andestech.com>,
<michal.simek@amd.com>, <peterlin@andestech.com>,
<ben.dooks@codethink.co.uk>, <samuel@sholland.org>,
<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:03:00 +0000 [thread overview]
Message-ID: <447d9553-6ca4-4f82-b2a0-4d445a09564b@microchip.com> (raw)
In-Reply-To: <20240821-smilingly-lance-c051e89df945@wendy>
On 21/08/2024 10:57, Conor Dooley wrote:
> 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.
To be clear, I did notice that if the dev_read_u32() does not populate
zicbom_block_size no cache ops will be done. My question was about
the behaviour relating to the config option and or emitting warnings etc.
Cheers,
Conor.
next prev parent reply other threads:[~2024-08-21 10:03 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
2024-08-21 10:03 ` Conor.Dooley [this message]
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=447d9553-6ca4-4f82-b2a0-4d445a09564b@microchip.com \
--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