Linux Power Management development
 help / color / mirror / Atom feed
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>,
	Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH] pmdomain: tegra: Add support for multi-socket platforms
Date: Fri, 22 May 2026 17:02:51 +0100	[thread overview]
Message-ID: <20260522160251.76862-1-jonathanh@nvidia.com> (raw)

On multi-socket platforms each socket has its own BPMP that is
registered with the kernel. For such platforms append 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 append the NUMA ID for
powergates that return a valid name because an invalid name indicates
that the powergate ID is not supported.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/pmdomain/tegra/powergate-bpmp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pmdomain/tegra/powergate-bpmp.c b/drivers/pmdomain/tegra/powergate-bpmp.c
index 8cde4f384846..1faaa92a5b02 100644
--- a/drivers/pmdomain/tegra/powergate-bpmp.c
+++ b/drivers/pmdomain/tegra/powergate-bpmp.c
@@ -137,6 +137,11 @@ 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' &&
+	    dev_to_node(bpmp->dev) != NUMA_NO_NODE)
+		return kasprintf(GFP_KERNEL, "%s.%d", response.get_name.name,
+				 dev_to_node(bpmp->dev));
+
 	return kstrdup(response.get_name.name, GFP_KERNEL);
 }
 
-- 
2.43.0


             reply	other threads:[~2026-05-22 16:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22 16:02 Jon Hunter [this message]
2026-05-29 15:12 ` [PATCH] pmdomain: tegra: Add support for multi-socket platforms Thierry Reding

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=20260522160251.76862-1-jonathanh@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