@@ -732,7 +732,11 @@ const struct cpumask *cpu_clustergroup_mask(int cpu)
void update_siblings_masks(unsigned int cpuid)
{
struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid];
- int cpu;
+ int cpu, ret;
+
+ ret = detect_cache_attributes(cpuid);
+ if (ret)
+ pr_info("Early cacheinfo failed, ret = %d\n", ret);
/* update core and thread sibling masks */
for_each_online_cpu(cpu) {
@@ -821,7 +825,7 @@ __weak int __init parse_acpi_topology(void)
#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV)
void __init init_cpu_topology(void)
{
- int ret, cpu;
+ int ret;
reset_cpu_topology();
ret = parse_acpi_topology();
@@ -836,13 +840,5 @@ void __init init_cpu_topology(void)
reset_cpu_topology();
return;
}
-
- for_each_possible_cpu(cpu) {
- ret = detect_cache_attributes(cpu);
- if (ret) {
- pr_info("Early cacheinfo failed, ret = %d\n", ret);
- break;
- }
- }
}
#endif