summaryrefslogtreecommitdiff
path: root/include/linux/cacheinfo.h
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2022-07-04 13:15:49 +0300
committerSudeep Holla <sudeep.holla@arm.com>2022-07-04 18:22:28 +0300
commitcc1cfc47ea47187a21ec1f079b3c53264157fe15 (patch)
tree2c2da0389e78144072aa729d21ea8ce5da40561f /include/linux/cacheinfo.h
parent9447eb0f1575572218267180b4edff937b3aec57 (diff)
downloadlinux-cc1cfc47ea47187a21ec1f079b3c53264157fe15.tar.xz
cacheinfo: Add support to check if last level cache(LLC) is valid or shared
It is useful to have helper to check if the given two CPUs share last level cache. We can do that check by comparing fw_token or by comparing the cache ID. Currently we check just for fw_token as the cache ID is optional. This helper can be used to build the llc_sibling during arch specific topology parsing and feeding information to the sched_domains. This also helps to get rid of llc_id in the CPU topology as it is sort of duplicate information. Also add helper to check if the llc information in cacheinfo is valid or not. Link: https://lore.kernel.org/r/20220704101605.1318280-6-sudeep.holla@arm.com Tested-by: Ionela Voinescu <ionela.voinescu@arm.com> Tested-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/cacheinfo.h')
-rw-r--r--include/linux/cacheinfo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
index 4ff37cb763ae..7e429bc5c1a4 100644
--- a/include/linux/cacheinfo.h
+++ b/include/linux/cacheinfo.h
@@ -82,6 +82,8 @@ struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu);
int init_cache_level(unsigned int cpu);
int populate_cache_leaves(unsigned int cpu);
int cache_setup_acpi(unsigned int cpu);
+bool last_level_cache_is_valid(unsigned int cpu);
+bool last_level_cache_is_shared(unsigned int cpu_x, unsigned int cpu_y);
#ifndef CONFIG_ACPI_PPTT
/*
* acpi_find_last_cache_level is only called on ACPI enabled