[PATCH v3 2/2] cache: add SMCCC-backed cache invalidate provider

Jonathan Cameron jonathan.cameron at oss.qualcomm.com
Thu Sep 10 11:52:04 PDT 2026


On Thu, 10 Sep 2026 08:21:42 +0000
Srirangan Madhavan <smadhavan at nvidia.com> wrote:

> Add a cache maintenance provider for the Arm SMCCC cache clean+invalidate
> interface.
> 
> The provider discovers SMCCC support and attributes at init time,
> serializes firmware calls, handles transient BUSY and RATE_LIMITED
> responses with bounded retries, and registers with the generic cache
> coherency framework used by memregion callers.
> 
> Signed-off-by: Srirangan Madhavan <smadhavan at nvidia.com>
> Reviewed-by: Jonathan Cameron <jic23 at kernel.org>

One tiny thing inline.

Thanks,

Jonathan


> diff --git a/drivers/cache/arm_smccc_cache.c b/drivers/cache/arm_smccc_cache.c
> new file mode 100644
> index 000000000000..1cfa8f8809d0
> --- /dev/null
> +++ b/drivers/cache/arm_smccc_cache.c
> @@ -0,0 +1,149 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2026 NVIDIA Corporation
> + *
> + * Arm SMCCC cache maintenance provider using cache clean+invalidate calls.
> + */
> +
> +#include <linux/arm-smccc.h>
> +#include <linux/cache_coherency.h>
> +#include <linux/cleanup.h>
> +#include <linux/delay.h>
> +#include <linux/errno.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>

Small thing, but can we avoid including the catch all that is kernel.h.
Generally aim for more specific headers for what is actually used.

> +#include <linux/mutex.h>
> +#include <linux/nmi.h>
> +




More information about the linux-arm-kernel mailing list