* [PATCH] firmware: tegra: bpmp: Add support for multi-socket platforms
@ 2026-05-22 10:16 Jon Hunter
2026-05-29 15:10 ` Jon Hunter
0 siblings, 1 reply; 2+ messages in thread
From: Jon Hunter @ 2026-05-22 10:16 UTC (permalink / raw)
To: Thierry Reding; +Cc: linux-tegra, Jon Hunter
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 debugfs directory name to ensure there is a
unique name for each BPMP. Note that a 32 byte array is more than large
enough for storing the name.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/firmware/tegra/bpmp-debugfs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c
index 4221fed70ad4..4f15aae5f124 100644
--- a/drivers/firmware/tegra/bpmp-debugfs.c
+++ b/drivers/firmware/tegra/bpmp-debugfs.c
@@ -772,6 +772,7 @@ static int bpmp_populate_debugfs_shmem(struct tegra_bpmp *bpmp)
int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
{
struct dentry *root;
+ char name[32] = "bpmp";
bool inband;
int err;
@@ -780,7 +781,10 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
if (!inband && !tegra_bpmp_mrq_is_supported(bpmp, MRQ_DEBUGFS))
return 0;
- root = debugfs_create_dir("bpmp", NULL);
+ if (dev_to_node(bpmp->dev) != NUMA_NO_NODE)
+ snprintf(name, sizeof(name), "bpmp.%d", dev_to_node(bpmp->dev));
+
+ root = debugfs_create_dir(name, NULL);
if (IS_ERR(root))
return -ENOMEM;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] firmware: tegra: bpmp: Add support for multi-socket platforms
2026-05-22 10:16 [PATCH] firmware: tegra: bpmp: Add support for multi-socket platforms Jon Hunter
@ 2026-05-29 15:10 ` Jon Hunter
0 siblings, 0 replies; 2+ messages in thread
From: Jon Hunter @ 2026-05-29 15:10 UTC (permalink / raw)
To: Thierry Reding; +Cc: linux-tegra
On 22/05/2026 11:16, Jon Hunter wrote:
> 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 debugfs directory name to ensure there is a
> unique name for each BPMP. Note that a 32 byte array is more than large
> enough for storing the name.
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> drivers/firmware/tegra/bpmp-debugfs.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c
> index 4221fed70ad4..4f15aae5f124 100644
> --- a/drivers/firmware/tegra/bpmp-debugfs.c
> +++ b/drivers/firmware/tegra/bpmp-debugfs.c
> @@ -772,6 +772,7 @@ static int bpmp_populate_debugfs_shmem(struct tegra_bpmp *bpmp)
> int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
> {
> struct dentry *root;
> + char name[32] = "bpmp";
> bool inband;
> int err;
>
> @@ -780,7 +781,10 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
> if (!inband && !tegra_bpmp_mrq_is_supported(bpmp, MRQ_DEBUGFS))
> return 0;
>
> - root = debugfs_create_dir("bpmp", NULL);
> + if (dev_to_node(bpmp->dev) != NUMA_NO_NODE)
> + snprintf(name, sizeof(name), "bpmp.%d", dev_to_node(bpmp->dev));
> +
> + root = debugfs_create_dir(name, NULL);
> if (IS_ERR(root))
> return -ENOMEM;
>
On further review, for multi-socket platforms, I think it would be best
if we put the 'bpmp.X' under a top level 'bpmp' directory. I will send
out an updated patch to do this.
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-29 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 10:16 [PATCH] firmware: tegra: bpmp: Add support for multi-socket platforms Jon Hunter
2026-05-29 15:10 ` Jon Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox