Re: [PATCH v2 17/19] riscv: errata: andes: generalize cache errata for Andes cores
From: Mina Chou
Date: Tue Nov 17 2026 - 05:13:07 EST
On Fri, Nov 13, 2026 at 01:59:11PM +0000, Conor Dooley wrote:
> > -static void errata_probe_iocp(unsigned int stage, unsigned long arch_id, unsigned long impid)
> > +static void errata_probe_andes_cache(unsigned int stage, unsigned long arch_id, unsigned long impid)
>
> Just call it probe so that you dont rename it again when the next
> erratum shows up?
>
Thanks for the suggestion, I'll give it a more generic name.
> > {
> > static bool done;
> >
> > @@ -51,11 +51,12 @@ static void errata_probe_iocp(unsigned int stage, unsigned long arch_id, unsigne
> >
> > done = true;
> >
> > - if (arch_id != ANDES_AX45MP_MARCHID || impid != ANDES_AX45MP_MIMPID)
> > - return;
> > -
> > - if (!ax45mp_iocp_sw_workaround())
> > + if (arch_id == ANDES_AX45MP_MARCHID && impid == ANDES_AX45MP_MIMPID) {
> > + if (!ax45mp_iocp_sw_workaround())
> > + return;
> > + } else if (riscv_isa_extension_available(NULL, ZICBOM)) {
> > return;
> > + }
>
> Is this correct? The code goes on to always mark noncoherent stuff
> supported, so this means that every andes device must then support
> noncoherent. The commit message's wording isn't that strong.
>
Yes, this is intended. IOCP is configurable on Andes cores: a core
either has no IOCP, or has IOCP that the SoC can enable or disable
(RZ/Five, for example, disables it). As this is up to each SoC, we
would rather not check it for every core and configuration, so the
errata marks non-coherent DMA as supported on every Andes core without
Zicbom.
This does not make any device non-coherent: a device is still coherent
unless the devicetree marks it dma-noncoherent, and the CCTL cache ops
are only registered when the devicetree has the LLC node.
I will make this explicit in the commit message.
> >
> > /* Set this just to make core cbo code happy */
>
> This comment is no longer accurate because you gave this value special
> meaning elsewhere in the series.
> That patch needs to change this comment.
>
> Cheers,
> Conor.
>
I will update the comment in the patch that gives this value its meaning.
Thanks,
Mina