Messages in this thread | | | From | Andy Shevchenko <> | Date | Mon, 11 Apr 2022 18:07:45 +0300 | Subject | Re: [PATCH] arch_topology: Do not set llc_sibling if llc_id is invalid |
| |
On Mon, Apr 11, 2022 at 12:10 PM Qing Wang <wangqing@vivo.com> wrote: > > 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.
Shouldn't it be a Fixes tag then?
> Don't set llc_sibling(default 0) if we don't know the cache topology.
...
> - if (cpuid_topo->llc_id == cpu_topo->llc_id) { > + if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) {
I'm wondering if more strict check is better here, i.e.
if (cpu_topo->llc_id >= 0 && cpuid_topo->llc_id == cpu_topo->llc_id) {
> cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling); > cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling); > }
-- With Best Regards, Andy Shevchenko
| |