mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Srirangan Madhavan <smadhavan@nvidia.com>,
	mark.rutland@arm.com, lpieralisi@kernel.org,
	sudeep.holla@kernel.org, conor@kernel.org, jic23@kernel.org
Cc: catalin.marinas@arm.com, will@kernel.org, treding@nvidia.com,
	jonathanh@nvidia.com, bence.csokas@arm.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v3 1/2] arm64: smccc: add cache clean/invalidate IDs and return codes
Date: Thu, 1 Oct 2026 11:34:12 +0200	[thread overview]
Message-ID: <0494fd68-2b73-4bbd-b013-7d1e79fdf01a@arm.com> (raw)
In-Reply-To: <20260910082142.1522865-2-smadhavan@nvidia.com>

Hi,

On 9/10/26 10:21, Srirangan Madhavan wrote:
> Define SMCCC Arch function IDs for CLEAN_INV_MEMREGION and its ATTRIBUTES
> call, and add RATE_LIMITED/BUSY return codes from DEN0028 for callers that
> need transient error handling.
> 
> Signed-off-by: Srirangan Madhavan <smadhavan@nvidia.com>
> Reviewed-by: Jonathan Cameron <jic23@kernel.org>
> ---
>   include/linux/arm-smccc.h       | 21 +++++++++++++++++++--
>   tools/include/linux/arm-smccc.h | 21 +++++++++++++++++++--
>   2 files changed, 38 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
> index 4de81848fe2e..2e205320d88a 100644
> --- a/include/linux/arm-smccc.h
> +++ b/include/linux/arm-smccc.hARM_SMCCC_FAST_CALL
> @@ -116,6 +116,22 @@
>   			   ARM_SMCCC_SMC_32,				\
>   			   ARM_SMCCC_OWNER_CPU, 0x10)
>   
> +/*
> + * DEN0028 v1.7 defines these cache maintenance functions as SMC64
> + * because they carry 64-bit memory range arguments.
> + */
> +#define ARM_SMCCC_ARCH_CLEAN_INV_MEMREGION				\
> +	ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,				\
> +			   ARM_SMCCC_SMC_64,				\
> +			   ARM_SMCCC_OWNER_ARCH,			\
> +			   0x5)
> +
> +#define ARM_SMCCC_ARCH_CLEAN_INV_MEMREGION_ATTRIBUTES			\
> +	ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,				\
> +			   ARM_SMCCC_SMC_64,				\
> +			   ARM_SMCCC_OWNER_ARCH,			\
> +			   0x6)
> +
>   #define ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID				\
>   	ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,				\
>   			   ARM_SMCCC_SMC_32,				\
> @@ -305,13 +321,14 @@
>   			   0x53)
>   
>   /*
> - * Return codes defined in ARM DEN 0070A
> - * ARM DEN 0070A is now merged/consolidated into ARM DEN 0028 C
> + * Return codes defined by Arm SMCCC (DEN0028 v1.7).
>    */
>   #define SMCCC_RET_SUCCESS			0
>   #define SMCCC_RET_NOT_SUPPORTED			-1
>   #define SMCCC_RET_NOT_REQUIRED			-2
>   #define SMCCC_RET_INVALID_PARAMETER		-3
> +#define SMCCC_RET_RATE_LIMITED			-4
> +#define SMCCC_RET_BUSY				-5
>   
>   #ifndef __ASSEMBLY__
>   
> diff --git a/tools/include/linux/arm-smccc.h b/tools/include/linux/arm-smccc.h
> index 63ce9bebccd3..ae5637b3240f 100644
> --- a/tools/include/linux/arm-smccc.h
> +++ b/tools/include/linux/arm-smccc.h

Why is that? Is there any tool using that? I don't think we 
unconditionally sync the two files?

The numbers in the file above match the spec, so for that part:

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre


> @@ -96,6 +96,22 @@
>   			   ARM_SMCCC_SMC_32,				\
>   			   0, 0x3fff)
>   
> +/*
> + * DEN0028 v1.7 defines these cache maintenance functions as SMC64
> + * because they carry 64-bit memory range arguments.
> + */
> +#define ARM_SMCCC_ARCH_CLEAN_INV_MEMREGION				\
> +	ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,				\
> +			   ARM_SMCCC_SMC_64,				\
> +			   ARM_SMCCC_OWNER_ARCH,			\
> +			   0x5)
> +
> +#define ARM_SMCCC_ARCH_CLEAN_INV_MEMREGION_ATTRIBUTES			\
> +	ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,				\
> +			   ARM_SMCCC_SMC_64,				\
> +			   ARM_SMCCC_OWNER_ARCH,			\
> +			   0x6)
> +
>   #define ARM_SMCCC_VENDOR_HYP_CALL_UID_FUNC_ID				\
>   	ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,				\
>   			   ARM_SMCCC_SMC_32,				\
> @@ -182,12 +198,13 @@
>   			   0x53)
>   
>   /*
> - * Return codes defined in ARM DEN 0070A
> - * ARM DEN 0070A is now merged/consolidated into ARM DEN 0028 C
> + * Return codes defined by Arm SMCCC (DEN0028 v1.7).
>    */
>   #define SMCCC_RET_SUCCESS			0
>   #define SMCCC_RET_NOT_SUPPORTED			-1
>   #define SMCCC_RET_NOT_REQUIRED			-2
>   #define SMCCC_RET_INVALID_PARAMETER		-3
> +#define SMCCC_RET_RATE_LIMITED			-4
> +#define SMCCC_RET_BUSY				-5
>   
>   #endif /*__LINUX_ARM_SMCCC_H*/


  reply	other threads:[~2026-10-01  9:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  8:21 [PATCH v3 0/2] Add SMCCC cache clean/invalidate provider Srirangan Madhavan
2026-09-10  8:21 ` [PATCH v3 1/2] arm64: smccc: add cache clean/invalidate IDs and return codes Srirangan Madhavan
2026-10-01  9:34   ` Andre Przywara [this message]
2026-09-10  8:21 ` [PATCH v3 2/2] cache: add SMCCC-backed cache invalidate provider Srirangan Madhavan
2026-09-10 18:52   ` Jonathan Cameron
2026-09-12 11:05   ` Conor Dooley
2026-10-01  9:21   ` Andre Przywara
2026-09-14  7:53 ` [PATCH v3 0/2] Add SMCCC cache clean/invalidate provider Bence Csókás

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0494fd68-2b73-4bbd-b013-7d1e79fdf01a@arm.com \
    --to=andre.przywara@arm.com \
    --cc=bence.csokas@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=conor@kernel.org \
    --cc=jic23@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=smadhavan@nvidia.com \
    --cc=sudeep.holla@kernel.org \
    --cc=treding@nvidia.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®