From: Jiaxun Yang Date: Sat, 28 Mar 2020 04:19:42 +0000 (+0800) Subject: lscpu: Adapt MIPS cpuinfo X-Git-Tag: v2.35.2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cd59115360806885def18472b75a50b4c3b1a02;p=thirdparty%2Futil-linux.git lscpu: Adapt MIPS cpuinfo MIPS have slightly different layout of cpuinfo. Signed-off-by: Jiaxun Yang --- diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 636d810a44..79b94dc758 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -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 */