From: Srirangan Madhavan <smadhavan@nvidia.com>
To: "Andre Przywara" <andre.przywara@arm.com>,
"Bence Csókás" <bence.csokas@arm.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,
aneesh.kumar@kernel.org, Souvik.Chakravarty@arm.com,
treding@nvidia.com, jonathanh@nvidia.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v4 2/2] cache: add SMCCC-backed cache invalidate provider
Date: Wed, 21 Oct 2026 16:10:46 -0700 [thread overview]
Message-ID: <658ec783-75c7-4f06-9f92-b3c179e0f8bc@nvidia.com> (raw)
In-Reply-To: <03b070de-b0b0-44d9-89ce-891e6c3ac4d2@arm.com>
On 10/15/26 3:03 AM, Andre Przywara wrote:
>>>> +static int smccc_cache_probe(struct arm_smccc_device *sdev)
>>>> +{
>>>> + struct arm_smccc_res res = {};
>>>> + struct smccc_cache *cache;
>>>> + int ret;
>>>> +
>>>> + arm_smccc_1_1_invoke(sdev->func_id, &res);
>>>
>>> I think you should provide the explicit function ID name here, and not
>>> rely on which function exactly is used to probe for the interface's
>>> existence.
>>
>> I thought that was the point of the matcher, that you could in theory
>
> But that probe() function here is not a "matcher" or a check function,
> that is done in the SMCCC bus generic code, using a function ID that has
> no side effects and does not return -1.
>
> The reason for this SMC call here is to learn the attributes, they are
> used below to fill the latency and rate_limit fields in the struct.
> So we should then make this explicit, I think, by using the
> ARM_SMCCC_ARCH_CLEAN_INV_MEMREGION_ATTRIBUTES name.
>> assign the same probe handler to any function ID? For example if there's
>> some FW that implements this (or a compatible) function, but at a
>> different ID, you would only update the match table? At least that's how
>> most subsystems (I2C, PCI, USB) do it.
>
> Not sure I understand this, this is a driver specifically for the
> CLEANINV_MEM_REGION SMCCC interface, I don't see how you would reuse
> that, or plug any other interfaces to it.
Thanks. The SMCCC bus has already performed the device matching before
probe(), and this invocation is specifically used to retrieve the cache
maintenance attributes. I changed this in v5 to use the explicit
function ID.
--
Regards,
Srirangan
next prev parent reply other threads:[~2026-10-21 23:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 7:02 [PATCH v4 0/2] Add SMCCC cache clean/invalidate provider Srirangan Madhavan
2026-10-13 7:02 ` [PATCH v4 1/2] arm64: smccc: add cache clean/invalidate IDs and return codes Srirangan Madhavan
2026-10-13 7:02 ` [PATCH v4 2/2] cache: add SMCCC-backed cache invalidate provider Srirangan Madhavan
2026-10-14 15:38 ` Andre Przywara
2026-10-15 7:43 ` Bence Csókás
2026-10-15 10:03 ` Andre Przywara
2026-10-21 23:10 ` Srirangan Madhavan [this message]
2026-10-15 18:30 ` Jonathan Cameron
2026-10-21 23:12 ` Srirangan Madhavan
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=658ec783-75c7-4f06-9f92-b3c179e0f8bc@nvidia.com \
--to=smadhavan@nvidia.com \
--cc=Souvik.Chakravarty@arm.com \
--cc=andre.przywara@arm.com \
--cc=aneesh.kumar@kernel.org \
--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=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®