]> git.itanic.dy.fi Git - linux-stable/commit
arch_topology: Set thread sibling cpumask only within the cluster
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 10:15:57 +0000 (11:15 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 15:22:29 +0000 (16:22 +0100)
commit3f8283296b16c4e43fd79a5ac364ae8171fe1567
tree8b057292581ea8abc8c186dd4a3246fc26a67a35
parent5b8dc787ce4a45c87254d1b0b22f161347ab7f81
arch_topology: Set thread sibling cpumask only within the cluster

Currently the cluster identifier is not set on the DT based platforms.
The reset or default value is -1 for all the CPUs. Once we assign the
cluster identifier values correctly that may result in getting the thread
siblings wrong as the core identifiers can be same for 2 different CPUs
belonging to 2 different cluster.

So, in order to get the thread sibling cpumasks correct, we need to
update them only if the cores they belong are in the same cluster within
the socket. Let us skip updation of the thread sibling cpumaks if the
cluster identifier doesn't match.

This change won't affect even if the cluster identifiers are not set
currently but will avoid any breakage once we set the same correctly.

Link: https://lore.kernel.org/r/20220704101605.1318280-14-sudeep.holla@arm.com
Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Ionela Voinescu <ionela.voinescu@arm.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/base/arch_topology.c