Currently if a L2 cache has an associated dependent L3 cache the lsslot
command for cpu connector types will fail to report the L3 cache when
using the -b option. This is due to a typo such that the check is made
between the the L2 caches l2-cache property value and its own
ibm,phandle property. The check should be against the L3 caches
ibm,phandle property as the l2-cache property contains the phandle of
the dependent cache.
Without patch:
./src/drmgr/lsslot -c cpu -b
drc-name OFDT-node drc_index thread id(s) l2-cache l3-cache
CPU 1 PowerPC,POWER8@0 10000000 0 1 2 3 4 5 6 7 l2-cache@200a N/A
With patch:
./src/drmgr/lsslot -c cpu -b
drc-name OFDT-node drc_index thread id(s) l2-cache l3-cache
CPU 1 PowerPC,POWER8@0 10000000 0 1 2 3 4 5 6 7 l2-cache@200a l3-cache@310a
Signed-off-by: Tyrel Datwyler <
tyr...@linux.ibm.com>
---
src/drmgr/common_cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drmgr/common_cpu.c b/src/drmgr/common_cpu.c
index 03a51eca6655..5bfd708cdc4e 100644
--- a/src/drmgr/common_cpu.c
+++ b/src/drmgr/common_cpu.c
@@ -414,7 +414,7 @@ cache_get_dependent_cache(struct cache_info *cache, struct dr_info *dr_info)
if (cache->removed)
continue;
- if (cache->phandle == cache->l2cache) {
+ if (c->phandle == cache->l2cache) {
say(EXTRA_DEBUG, "found cache %s for cache %s\n",
c->name, cache->name);
return c;
--
2.43.0