[PATCH v2 16/19] riscv: errata: andes: allow ERRATA_ANDES_CMO on all Andes SoCs

Mina Chou minachou at andestech.com
Mon Nov 16 19:28:15 PST 2026


On Fri, Nov 13, 2026 at 02:00:46PM +0000, Conor Dooley wrote:
> [EXTERNAL MAIL]

> Date: Fri, 13 Nov 2026 14:00:46 +0000
> From: Conor Dooley <conor at kernel.org>
> To: Mina Hui-Min Chou <minachou at andestech.com>
> Cc: pjw at kernel.org, palmer at dabbelt.com, aou at eecs.berkeley.edu,
>  alex at ghiti.fr, jic23 at kernel.org, robh at kernel.org, krzk+dt at kernel.org,
>  conor+dt at kernel.org, geert+renesas at glider.be, magnus.damm at gmail.com,
>  prabhakar.mahadev-lad.rj at bp.renesas.com, linux-riscv at lists.infradead.org,
>  devicetree at vger.kernel.org, linux-renesas-soc at vger.kernel.org,
>  linux-kernel at vger.kernel.org, randolph at andestech.com,
>  cyyang772 at andestech.com, tim609 at andestech.com, az70021 at gmail.com
> Subject: Re: [PATCH v2 16/19] riscv: errata: andes: allow ERRATA_ANDES_CMO
>  on all Andes SoCs
> 
> On Fri, Nov 13, 2026 at 03:11:40PM +0800, Mina Hui-Min Chou wrote:
> > ERRATA_ANDES_CMO depends on ARCH_R9A07G043, so it can only be enabled
> > for the Renesas RZ/Five, although other Andes SoCs such as those built
> > on the A27L2 need it too. Drop the dependency, and select
> > ANDES_LLCACHE and CACHEMAINT_FOR_DMA so that the errata always comes
> > with its cache driver, which ARCH_R9A07G043 used to guarantee.
> > 
> > As ERRATA_ANDES_CMO is default y, it is now also enabled in the generic
> > riscv defconfig. The errata only acts on Andes cores at boot, so other
> > platforms are not affected.
> > 
> > RZ/Five still gets uncached memory for coherent DMA allocations from the
> > DMA_GLOBAL_POOL that ARCH_R9A07G043 selects. This patch only covers
> > cache maintenance for streaming DMA; how other platforms provide uncached
> > memory stays platform specific.
> > 
> > Signed-off-by: Mina Hui-Min Chou <minachou at andestech.com>
> > ---
> >  arch/riscv/Kconfig.errata | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/riscv/Kconfig.errata b/arch/riscv/Kconfig.errata
> > index 4f77b3c6d7fd..3c43e065aa01 100644
> > --- a/arch/riscv/Kconfig.errata
> > +++ b/arch/riscv/Kconfig.errata
> > @@ -12,7 +12,9 @@ config ERRATA_ANDES
> >  
> >  config ERRATA_ANDES_CMO
> >  	bool "Apply Andes cache management errata"
> > -	depends on ERRATA_ANDES && ARCH_R9A07G043
> > +	depends on ERRATA_ANDES
> > +	select ANDES_LLCACHE
> > +	select CACHEMAINT_FOR_DMA
> 
> If you're selecting it here, can you not drop it from the renesas soc
> Kconfig file?
> 

Thanks for catching that! ARCH_R9A07G043 selects ERRATA_ANDES_CMO,
so the selects there are redundant now. I will drop them in v3, something like:

diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig
@@ -465,8 +465,6 @@ config ARCH_R9A07G043
...
        select ARCH_RZG2L
-       select ANDES_LLCACHE
-       select CACHEMAINT_FOR_DMA

Thanks,
Mina



More information about the linux-riscv mailing list