From: Jon Hunter <jonathanh@nvidia.com>
To: Ulf Hansson <ulfh@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH V3] pmdomain: tegra: Add support for multi-socket platforms
Date: Tue, 7 Jul 2026 07:26:52 +0100 [thread overview]
Message-ID: <9e49015d-f800-4396-a5be-c93c35ac6b63@nvidia.com> (raw)
In-Reply-To: <20260602193248.443101-1-jonathanh@nvidia.com>
Hi Ulf,
On 02/06/2026 20:32, Jon Hunter wrote:
> On multi-socket platforms each socket has its own BPMP that is
> registered with the kernel. For such platforms prefix the NUMA ID for
> each socket to the BPMP powergate name to ensure there is a unique name
> for each power-domain. Note that we only add the NUMA ID for powergates
> that return a valid name because an invalid name indicates that the
> powergate ID is not supported.
>
> Note the check for the NULL string is moved into the function
> tegra_bpmp_powergate_get_name(), because in the multi-socket case we
> must only add the prefix if we receive a valid name. A NULL string
> indicates that there is no valid powergate associated with the ID that
> is being queried.
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> Changes since V2:
> - Moved the test for a NULL string to a common location that can be
> used for both single and multi-socket platforms.
> Changes since V1:
> - Use NUMA ID as a prefix and not a suffix for the powergate name.
>
> drivers/pmdomain/tegra/powergate-bpmp.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pmdomain/tegra/powergate-bpmp.c b/drivers/pmdomain/tegra/powergate-bpmp.c
> index 8cde4f384846..e6a7e025b012 100644
> --- a/drivers/pmdomain/tegra/powergate-bpmp.c
> +++ b/drivers/pmdomain/tegra/powergate-bpmp.c
> @@ -137,6 +137,13 @@ static char *tegra_bpmp_powergate_get_name(struct tegra_bpmp *bpmp,
> if (err < 0 || msg.rx.ret < 0)
> return NULL;
>
> + if (response.get_name.name[0] == '\0')
> + return NULL;
> +
> + if (dev_to_node(bpmp->dev) != NUMA_NO_NODE)
> + return kasprintf(GFP_KERNEL, "%d-%s", dev_to_node(bpmp->dev),
> + response.get_name.name);
> +
> return kstrdup(response.get_name.name, GFP_KERNEL);
> }
>
> @@ -234,7 +241,7 @@ tegra_bpmp_probe_powergates(struct tegra_bpmp *bpmp,
> struct tegra_powergate_info *info = &powergates[count];
>
> info->name = tegra_bpmp_powergate_get_name(bpmp, id);
> - if (!info->name || info->name[0] == '\0') {
> + if (!info->name) {
> num_holes++;
> continue;
> }
Please let me know if you have any comments on this or if this is OK to
be picked up now?
Thanks
Jon
--
nvpublic
next prev parent reply other threads:[~2026-07-07 6:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 19:32 [PATCH V3] pmdomain: tegra: Add support for multi-socket platforms Jon Hunter
2026-07-07 6:26 ` Jon Hunter [this message]
2026-07-13 11:06 ` Ulf Hansson
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=9e49015d-f800-4396-a5be-c93c35ac6b63@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@kernel.org \
--cc=ulfh@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