[RFC PATCH 2/2] arm64: mm: add SMCCC-backed cache invalidate provider
Catalin Marinas
catalin.marinas at arm.com
Thu May 21 09:35:45 PDT 2026
On Thu, May 21, 2026 at 12:18:12PM +0100, Jonathan Cameron wrote:
> On Thu, 21 May 2026 07:30:47 +0000
> Srirangan Madhavan <smadhavan at nvidia.com> wrote:
> > MAINTAINERS | 1 +
> > arch/arm64/mm/Makefile | 1 +
> > arch/arm64/mm/cache_maint.c | 180 ++++++++++++++++++++++++++++++++++++
>
> File location wise, this is a driver for a subsystem, be it one closely
> coupled to arm. Arm maintainers, do you want it in there or in drivers/cache ?
> My personal preference is always to keep drivers with subsystems but I don't
> care that much.
Yes, it makes more sense to keep it under drivers/cache/. We have many
other users of the SMCCC interface under drivers/.
>
> > 3 files changed, 182 insertions(+)
> > create mode 100644 arch/arm64/mm/cache_maint.c
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 2fb1c75afd16..33c35f8e6e40 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -25383,6 +25383,7 @@ M: Jonathan Cameron <jic23 at kernel.org>
> > S: Maintained
> > T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
> > F: Documentation/devicetree/bindings/cache/
> > +F: arch/arm64/mm/cache_maint.c
>
> I wonder if this should just have a separate maintainers entry?
> We did that for the hisi driver.
Not needed if the code is moved to drivers/cache/.
> > +struct arm64_smccc_cache {
> > + /* Must be first member */
> > + struct cache_coherency_ops_inst cci;
> > + struct mutex lock; /* Serializes SMCCC cache maintenance calls. */
> > + u32 latency_us;
> > + u32 rate_limit;
> > + bool global_op;
> > + u64 global_flush_gen;
> > +};
> > +
> > +static struct arm64_smccc_cache *arm64_smccc_cache;
Nit: if these are all static, does it still make sense to use the arm64_
prefix throughout this file?
--
Catalin
More information about the linux-arm-kernel
mailing list