Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / base / cacheinfo.c
index b444f89a2041646818260382b2d4f7b4caeec207..8d553c92cd3225761a78f113d8caf8a75988bdd6 100644 (file)
@@ -213,6 +213,8 @@ int __weak cache_setup_acpi(unsigned int cpu)
        return -ENOTSUPP;
 }
 
+unsigned int coherency_max_size;
+
 static int cache_shared_cpu_map_setup(unsigned int cpu)
 {
        struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
@@ -251,6 +253,9 @@ static int cache_shared_cpu_map_setup(unsigned int cpu)
                                cpumask_set_cpu(i, &this_leaf->shared_cpu_map);
                        }
                }
+               /* record the maximum cache line size */
+               if (this_leaf->coherency_line_size > coherency_max_size)
+                       coherency_max_size = this_leaf->coherency_line_size;
        }
 
        return 0;