summaryrefslogtreecommitdiff
path: root/drivers/base/cacheinfo.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-04-21 13:24:18 +0200
committerPeter Zijlstra <peterz@infradead.org>2023-04-21 13:24:18 +0200
commit5a4d3b38ed0cd5bbb03eccea6d9949136abc45c3 (patch)
tree1e653da8837c52ed1d24126974a0d7dbbdf34e02 /drivers/base/cacheinfo.c
parent9b8e17813aeccc29c2f9f2e6e68997a6eac2d26d (diff)
parent6a8f57ae2eb07ab39a6f0ccad60c760743051026 (diff)
downloadlwn-5a4d3b38ed0cd5bbb03eccea6d9949136abc45c3.tar.gz
lwn-5a4d3b38ed0cd5bbb03eccea6d9949136abc45c3.zip
Merge branch 'v6.3-rc7'
Sync with the urgent patches; in particular: a53ce18cacb4 ("sched/fair: Sanitize vruntime of entity being migrated") Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'drivers/base/cacheinfo.c')
-rw-r--r--drivers/base/cacheinfo.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index f6573c335f4c..f3903d002819 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -474,12 +474,18 @@ int detect_cache_attributes(unsigned int cpu)
populate_leaves:
/*
- * populate_cache_leaves() may completely setup the cache leaves and
- * shared_cpu_map or it may leave it partially setup.
+ * If LLC is valid the cache leaves were already populated so just go to
+ * update the cpu map.
*/
- ret = populate_cache_leaves(cpu);
- if (ret)
- goto free_ci;
+ if (!last_level_cache_is_valid(cpu)) {
+ /*
+ * populate_cache_leaves() may completely setup the cache leaves and
+ * shared_cpu_map or it may leave it partially setup.
+ */
+ ret = populate_cache_leaves(cpu);
+ if (ret)
+ goto free_ci;
+ }
/*
* For systems using DT for cache hierarchy, fw_token