]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: Adapt MIPS cpuinfo
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Sat, 28 Mar 2020 04:19:42 +0000 (12:19 +0800)
committerJiaxun Yang <jiaxun.yang@flygoat.com>
Sat, 28 Mar 2020 04:19:42 +0000 (12:19 +0800)
MIPS have slightly different layout of cpuinfo.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
sys-utils/lscpu.c

index 636d810a441c8c66de97506d3e1005c4877a6f0b..79b94dc7589d557c8c004f3e841ee1013f67d287 100644 (file)
@@ -536,6 +536,7 @@ read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod)
                else if (lookup(buf, "cpu family", &desc->family)) ;
                else if (lookup(buf, "model", &desc->model)) ;
                else if (lookup(buf, "CPU part", &desc->model)) ; /* ARM and aarch64 */
+               else if (lookup(buf, "cpu model", &desc->model)) ; /* mips */
                else if (lookup(buf, "model name", &desc->modelname)) ;
                else if (lookup(buf, "stepping", &desc->stepping)) ;
                else if (lookup(buf, "CPU variant", &desc->stepping)) ; /* aarch64 */
@@ -545,6 +546,7 @@ read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod)
                else if (lookup(buf, "flags", &desc->flags)) ;          /* x86 */
                else if (lookup(buf, "features", &desc->flags)) ;       /* s390 */
                else if (lookup(buf, "Features", &desc->flags)) ;       /* aarch64 */
+               else if (lookup(buf, "ASEs implemented", &desc->flags)) ;       /* mips */
                else if (lookup(buf, "type", &desc->flags)) ;           /* sparc64 */
                else if (lookup(buf, "bogomips", &desc->bogomips)) ;
                else if (lookup(buf, "BogoMIPS", &desc->bogomips)) ;    /* aarch64 */