Skip to content

Commit 2f0bdb0

Browse files
committed
lsslot: fix reporting of L3 caches with -b option
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 <[email protected]>
1 parent a63f082 commit 2f0bdb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/drmgr/common_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ cache_get_dependent_cache(struct cache_info *cache, struct dr_info *dr_info)
414414
if (cache->removed)
415415
continue;
416416

417-
if (cache->phandle == cache->l2cache) {
417+
if (c->phandle == cache->l2cache) {
418418
say(EXTRA_DEBUG, "found cache %s for cache %s\n",
419419
c->name, cache->name);
420420
return c;

0 commit comments

Comments
 (0)