]> git.itanic.dy.fi Git - linux-stable/commit
cacheinfo: Add support to check if last level cache(LLC) is valid or shared
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 10:15:49 +0000 (11:15 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 15:22:28 +0000 (16:22 +0100)
commitcc1cfc47ea47187a21ec1f079b3c53264157fe15
tree2c2da0389e78144072aa729d21ea8ce5da40561f
parent9447eb0f1575572218267180b4edff937b3aec57
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>
drivers/base/cacheinfo.c
include/linux/cacheinfo.h