Messages in this thread Patch in this message |  | | From | Qing Wang <> | Subject | [PATCH] arch_topology: Do not set llc_sibling if llc_id is invalid | Date | Sun, 10 Apr 2022 19:36:19 -0700 |
| |
From: Wang Qing <wangqing@vivo.com>
When ACPI is not enabled, cpuid_topo->llc_id = cpu_topo->llc_id = -1, which will set llc_sibling 0xff(...), this is misleading.
Don't set llc_sibling(default 0) if we don't know the cache topology.
Signed-off-by: Wang Qing <wangqing@vivo.com> --- drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 1d6636e..5c3a642 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -684,7 +684,7 @@ void update_siblings_masks(unsigned int cpuid) for_each_online_cpu(cpu) { cpu_topo = &cpu_topology[cpu]; - if (cpuid_topo->llc_id == cpu_topo->llc_id) { + if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) { cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling); cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling); } -- 2.7.4
|  |