]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: assume L1d, L1i, L2, L3 for sparc
authorKarel Zak <kzak@redhat.com>
Mon, 3 May 2021 18:28:30 +0000 (20:28 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 3 May 2021 18:28:30 +0000 (20:28 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu-topology.c

index e9d436f81c9d3c0f297008a492aef3ff6e489571..485c17485fc70a094f30ba6824ccb1657a815882 100644 (file)
@@ -357,13 +357,10 @@ static int read_sparc_onecache(struct lscpu_cxt *cxt, struct lscpu_cpu *cpu,
 
 static int read_sparc_caches(struct lscpu_cxt *cxt, struct lscpu_cpu *cpu)
 {
-       int i;
-
-       for (i = 1; i <= 3; i++) {
-               read_sparc_onecache(cxt, cpu, i, "Instruction", 'i');
-               read_sparc_onecache(cxt, cpu, i, "Data", 'd');
-               read_sparc_onecache(cxt, cpu, i, "Unified", 0);
-       }
+       read_sparc_onecache(cxt, cpu, 1, "Instruction", 'i');
+       read_sparc_onecache(cxt, cpu, 1, "Data", 'd');
+       read_sparc_onecache(cxt, cpu, 2, "Unified", 0);
+       read_sparc_onecache(cxt, cpu, 2, "Unified", 0);
 
        return 0;
 }