* [PATCH V2] clk: tegra: Support unique names for multi-socket platforms
@ 2026-06-02 8:43 Jon Hunter
2026-06-02 12:01 ` Thierry Reding
2026-06-15 16:08 ` Brian Masney
0 siblings, 2 replies; 6+ messages in thread
From: Jon Hunter @ 2026-06-02 8:43 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Thierry Reding
Cc: linux-clk, linux-tegra, Jon Hunter, Timo Alho
On multi-socket platforms each socket has its own BPMP which exposes the
same clock names. Fix this by using the NUMA ID as a prefix for the
clock names on multi-socket platforms.
Use 'sizeof(info->name)' in the strscpy() and snprintf() functions to
future proof against anyone changing the size of the 'name' array.
Co-developed-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
Changes since V1:
- Use NUMA ID as a prefix and not a suffix for the clock name.
drivers/clk/tegra/clk-bpmp.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c
index f6d2b934228b..067a8555c4e7 100644
--- a/drivers/clk/tegra/clk-bpmp.c
+++ b/drivers/clk/tegra/clk-bpmp.c
@@ -367,7 +367,15 @@ static int tegra_bpmp_clk_get_info(struct tegra_bpmp *bpmp, unsigned int id,
if (err < 0)
return err;
- strscpy(info->name, response.name, MRQ_CLK_NAME_MAXLEN);
+ if (dev_to_node(bpmp->dev) == NUMA_NO_NODE) {
+ strscpy(info->name, response.name, sizeof(info->name));
+ } else {
+ err = snprintf(info->name, sizeof(info->name), "%d-%s",
+ dev_to_node(bpmp->dev), response.name);
+ if (WARN_ON(err >= sizeof(info->name)))
+ return -E2BIG;
+ }
+
info->num_parents = response.num_parents;
for (i = 0; i < info->num_parents; i++)
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH V2] clk: tegra: Support unique names for multi-socket platforms
2026-06-02 8:43 [PATCH V2] clk: tegra: Support unique names for multi-socket platforms Jon Hunter
@ 2026-06-02 12:01 ` Thierry Reding
2026-07-07 6:28 ` Jon Hunter
2026-06-15 16:08 ` Brian Masney
1 sibling, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2026-06-02 12:01 UTC (permalink / raw)
To: Jon Hunter
Cc: Michael Turquette, Stephen Boyd, linux-clk, linux-tegra,
Timo Alho
[-- Attachment #1: Type: text/plain, Size: 799 bytes --]
On Tue, Jun 02, 2026 at 09:43:34AM +0100, Jon Hunter wrote:
> On multi-socket platforms each socket has its own BPMP which exposes the
> same clock names. Fix this by using the NUMA ID as a prefix for the
> clock names on multi-socket platforms.
>
> Use 'sizeof(info->name)' in the strscpy() and snprintf() functions to
> future proof against anyone changing the size of the 'name' array.
>
> Co-developed-by: Timo Alho <talho@nvidia.com>
> Signed-off-by: Timo Alho <talho@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> Changes since V1:
> - Use NUMA ID as a prefix and not a suffix for the clock name.
>
> drivers/clk/tegra/clk-bpmp.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] clk: tegra: Support unique names for multi-socket platforms
2026-06-02 12:01 ` Thierry Reding
@ 2026-07-07 6:28 ` Jon Hunter
2026-07-07 15:01 ` Brian Masney
0 siblings, 1 reply; 6+ messages in thread
From: Jon Hunter @ 2026-07-07 6:28 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-tegra, Timo Alho, Thierry Reding, linux-clk
Hi Mike, Stephen,
On 02/06/2026 13:01, Thierry Reding wrote:
> On Tue, Jun 02, 2026 at 09:43:34AM +0100, Jon Hunter wrote:
>> On multi-socket platforms each socket has its own BPMP which exposes the
>> same clock names. Fix this by using the NUMA ID as a prefix for the
>> clock names on multi-socket platforms.
>>
>> Use 'sizeof(info->name)' in the strscpy() and snprintf() functions to
>> future proof against anyone changing the size of the 'name' array.
>>
>> Co-developed-by: Timo Alho <talho@nvidia.com>
>> Signed-off-by: Timo Alho <talho@nvidia.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> Changes since V1:
>> - Use NUMA ID as a prefix and not a suffix for the clock name.
>>
>> drivers/clk/tegra/clk-bpmp.c | 10 +++++++++-
>> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> Reviewed-by: Thierry Reding <treding@nvidia.com>
Please let me know if you have any comments on this or if this is OK to
be picked up now?
Thanks
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] clk: tegra: Support unique names for multi-socket platforms
2026-07-07 6:28 ` Jon Hunter
@ 2026-07-07 15:01 ` Brian Masney
2026-07-07 15:26 ` Jon Hunter
0 siblings, 1 reply; 6+ messages in thread
From: Brian Masney @ 2026-07-07 15:01 UTC (permalink / raw)
To: Jon Hunter
Cc: Michael Turquette, Stephen Boyd, linux-tegra, Timo Alho,
Thierry Reding, linux-clk
Hi Jon,
On Tue, Jul 07, 2026 at 07:28:38AM +0100, Jon Hunter wrote:
> On 02/06/2026 13:01, Thierry Reding wrote:
> > On Tue, Jun 02, 2026 at 09:43:34AM +0100, Jon Hunter wrote:
> > > On multi-socket platforms each socket has its own BPMP which exposes the
> > > same clock names. Fix this by using the NUMA ID as a prefix for the
> > > clock names on multi-socket platforms.
> > >
> > > Use 'sizeof(info->name)' in the strscpy() and snprintf() functions to
> > > future proof against anyone changing the size of the 'name' array.
> > >
> > > Co-developed-by: Timo Alho <talho@nvidia.com>
> > > Signed-off-by: Timo Alho <talho@nvidia.com>
> > > Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> > > ---
> > > Changes since V1:
> > > - Use NUMA ID as a prefix and not a suffix for the clock name.
> > >
> > > drivers/clk/tegra/clk-bpmp.c | 10 +++++++++-
> > > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > Reviewed-by: Thierry Reding <treding@nvidia.com>
>
>
> Please let me know if you have any comments on this or if this is OK to be
> picked up now?
I made a pull for Stephen last week for various clk patches that were
missed during the last merge window. I included your patch.
https://lore.kernel.org/linux-clk/akLzCVzbMbUsgDda@redhat.com/
I'm going to collect up stuff at rc6 this development cycle and assemble
another pull then.
Brian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] clk: tegra: Support unique names for multi-socket platforms
2026-07-07 15:01 ` Brian Masney
@ 2026-07-07 15:26 ` Jon Hunter
0 siblings, 0 replies; 6+ messages in thread
From: Jon Hunter @ 2026-07-07 15:26 UTC (permalink / raw)
To: Brian Masney
Cc: Michael Turquette, Stephen Boyd, linux-tegra, Timo Alho,
Thierry Reding, linux-clk
Hi Brian,
On 07/07/2026 16:01, Brian Masney wrote:
> Hi Jon,
>
> On Tue, Jul 07, 2026 at 07:28:38AM +0100, Jon Hunter wrote:
>> On 02/06/2026 13:01, Thierry Reding wrote:
>>> On Tue, Jun 02, 2026 at 09:43:34AM +0100, Jon Hunter wrote:
>>>> On multi-socket platforms each socket has its own BPMP which exposes the
>>>> same clock names. Fix this by using the NUMA ID as a prefix for the
>>>> clock names on multi-socket platforms.
>>>>
>>>> Use 'sizeof(info->name)' in the strscpy() and snprintf() functions to
>>>> future proof against anyone changing the size of the 'name' array.
>>>>
>>>> Co-developed-by: Timo Alho <talho@nvidia.com>
>>>> Signed-off-by: Timo Alho <talho@nvidia.com>
>>>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>>>> ---
>>>> Changes since V1:
>>>> - Use NUMA ID as a prefix and not a suffix for the clock name.
>>>>
>>>> drivers/clk/tegra/clk-bpmp.c | 10 +++++++++-
>>>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>>
>>> Reviewed-by: Thierry Reding <treding@nvidia.com>
>>
>>
>> Please let me know if you have any comments on this or if this is OK to be
>> picked up now?
>
> I made a pull for Stephen last week for various clk patches that were
> missed during the last merge window. I included your patch.
>
> https://lore.kernel.org/linux-clk/akLzCVzbMbUsgDda@redhat.com/
>
> I'm going to collect up stuff at rc6 this development cycle and assemble
> another pull then.
OK great! Thanks!
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] clk: tegra: Support unique names for multi-socket platforms
2026-06-02 8:43 [PATCH V2] clk: tegra: Support unique names for multi-socket platforms Jon Hunter
2026-06-02 12:01 ` Thierry Reding
@ 2026-06-15 16:08 ` Brian Masney
1 sibling, 0 replies; 6+ messages in thread
From: Brian Masney @ 2026-06-15 16:08 UTC (permalink / raw)
To: Jon Hunter
Cc: Michael Turquette, Stephen Boyd, Thierry Reding, linux-clk,
linux-tegra, Timo Alho
On Tue, Jun 02, 2026 at 09:43:34AM +0100, Jon Hunter wrote:
> On multi-socket platforms each socket has its own BPMP which exposes the
> same clock names. Fix this by using the NUMA ID as a prefix for the
> clock names on multi-socket platforms.
>
> Use 'sizeof(info->name)' in the strscpy() and snprintf() functions to
> future proof against anyone changing the size of the 'name' array.
>
> Co-developed-by: Timo Alho <talho@nvidia.com>
> Signed-off-by: Timo Alho <talho@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-07 15:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 8:43 [PATCH V2] clk: tegra: Support unique names for multi-socket platforms Jon Hunter
2026-06-02 12:01 ` Thierry Reding
2026-07-07 6:28 ` Jon Hunter
2026-07-07 15:01 ` Brian Masney
2026-07-07 15:26 ` Jon Hunter
2026-06-15 16:08 ` Brian Masney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox