mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
pmdomain: tegra: Add support for multi-socket platforms
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> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
This commit is contained in:
parent
7528403281
commit
9956ad2afd
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user