Re: [PATCH v2 18/19] riscv: errata: andes: limit the IOCP workaround to RZ/Five

From: Conor Dooley

Date: Tue Nov 17 2026 - 12:38:31 EST


On Tue, Nov 17, 2026 at 05:24:31PM +0800, Mina Chou wrote:
> On Fri, Nov 13, 2026 at 01:53:29PM +0000, Conor Dooley wrote:
> > > Move the match into soc_is_r9a07g043f() and make it also require
> > > ARCH_R9A07G043. Kernels without RZ/Five support then skip the SBI call
> > > and take the generic Andes cache errata path. No other upstream-
> > > supported SoC uses this AX45MP mimpid, so their behavior does not
> > > change.
> >
> > But a device using this soc that doesn't have a dts in mainline won't
> > function properly, so this is fragile. Why not just do it properly and
> > check for RZ/Five specifically?
> > Can check for of_machine_is_compatible() probably?
>
> I will check for RZ/Five with of_machine_is_compatible("renesas,r9a07g043"),
> which on RISC-V is only used by RZ/Five, and drop the marchid/mimpid match.

Looking at what is quoted, I wonder if my main point I forgot to
include. Checking for ARCH_R9... (or any other SoC in that manner) will
fall over on multiplatform kernels. Code needs to be written so that no
matter what Kconfig options are enabled it will work.
of_machine_is_compatible() solves that though.

Attachment: signature.asc
Description: PGP signature