clk: tegra: Support unique names for multi-socket platforms
Subsystems (3)
Jon Hunter
maintainerPATCH v2 1/1 clk: tegra: Support unique names for multi-socket platforms
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.
---
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(-)
drivers/clk/tegra/clk-bpmp.c +9 -1
@@ -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++)
Signature · 1 line
2.43.0
Quoted 10 lines · Jon Hunter
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 thestrscpy()andsnprintf()functions to future proof against anyone changing the size of the 'name' array.Co-developed-by Timo Alho <[email protected]>Signed-off-by Timo Alho <[email protected]>Signed-off-by Jon Hunter <[email protected]>
Quoted 6 lines
---
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(-)
Jon Hunter
maintainerHi Mike, Stephen,
Quoted 15 lines · Thierry Reding
Quoted 14 lines · Jon Hunter
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 thestrscpy()andsnprintf()functions to future proof against anyone changing the size of the 'name' array.Co-developed-by Timo Alho <[email protected]>Signed-off-by Timo Alho <[email protected]>Signed-off-by Jon Hunter <[email protected]>---
Changes since V1:
- Use NUMA ID as a prefix and not a suffix for the clock name.
Quoted 4 lines
Quoted 2 lines
drivers/clk/tegra/clk-bpmp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)Reviewed-by Thierry Reding <[email protected]>
Please let me know if you have any comments on this or if this is OK to be picked up now?
Thanks
Jon
Signature · 1 line
nvpublic
Hi Jon,
Quoted 16 lines · Jon Hunter
Quoted 15 lines · Thierry Reding
Quoted 14 lines · Jon Hunter
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 thestrscpy()andsnprintf()functions to future proof against anyone changing the size of the 'name' array.Co-developed-by Timo Alho <[email protected]>Signed-off-by Timo Alho <[email protected]>Signed-off-by Jon Hunter <[email protected]>---
Changes since V1:
- Use NUMA ID as a prefix and not a suffix for the clock name.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
drivers/clk/tegra/clk-bpmp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)Reviewed-by Thierry Reding <[email protected]>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/[email protected]/
I'm going to collect up stuff at rc6 this development cycle and assemble another pull then.
Brian
Jon Hunter
maintainerHi Brian,
Quoted 28 lines · Brian Masney
Hi Jon,
Quoted 16 lines · Jon Hunter
Quoted 15 lines · Thierry Reding
Quoted 14 lines · Jon Hunter
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 thestrscpy()andsnprintf()functions to future proof against anyone changing the size of the 'name' array.Co-developed-by Timo Alho <[email protected]>Signed-off-by Timo Alho <[email protected]>Signed-off-by Jon Hunter <[email protected]>---
Changes since V1:
- Use NUMA ID as a prefix and not a suffix for the clock name.Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
drivers/clk/tegra/clk-bpmp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)Reviewed-by Thierry Reding <[email protected]>Please let me know if you have any comments on this or if this is OK to be picked up now?
Quoted 7 lines
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/[email protected]/
I'm going to collect up stuff at rc6 this development cycle and assemble another pull then.
OK great! Thanks!
Jon
Signature · 1 line
nvpublic
Quoted 10 lines · Jon Hunter
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 thestrscpy()andsnprintf()functions to future proof against anyone changing the size of the 'name' array.Co-developed-by Timo Alho <[email protected]>Signed-off-by Timo Alho <[email protected]>Signed-off-by Jon Hunter <[email protected]>