From 2db7f82625c20bff88fb6bf4537ab1a2192fa5ca Mon Sep 17 00:00:00 2001 From: basebuilder_pel7ppc64bebuilder0 Date: Thu, 17 May 2018 19:13:29 +0200 Subject: [PATCH] util linux patches Signed-off-by: basebuilder_pel7ppc64bebuilder0 --- ...odel-and-model-name-on-Power-Systems.patch | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 SOURCES/0067-lscpu-Fix-model-and-model-name-on-Power-Systems.patch diff --git a/SOURCES/0067-lscpu-Fix-model-and-model-name-on-Power-Systems.patch b/SOURCES/0067-lscpu-Fix-model-and-model-name-on-Power-Systems.patch new file mode 100644 index 00000000..b3864ee0 --- /dev/null +++ b/SOURCES/0067-lscpu-Fix-model-and-model-name-on-Power-Systems.patch @@ -0,0 +1,82 @@ +From 246ab88515fca389c02602521fc765d3e597fd7a Mon Sep 17 00:00:00 2001 +From: Vasant Hegde +Date: Mon, 14 Mar 2016 20:18:07 +0530 +Subject: [PATCH 67/84] lscpu: Fix model and model name on Power Systems + +On Power System, lspcu presently displays system model number instead of +processor model name. 'model' tag in cpuinfo contains system model name, +not processor model. Instead it uses 'cpu' tag for processor model name. +Also it uses 'revision' tag for processor model. + +Fix lspcu so that it displays processor model number. Also display processor +model name. + +cpuinfo output on Power System: + ... + ... + + processor : 127 + cpu : POWER8E (raw), altivec supported + clock : 4322.000000MHz + revision : 2.1 (pvr 004b 0201) + + timebase : 512000000 + platform : PowerNV + model : 8286-42A + machine : PowerNV 8286-42A + firmware : OPAL + +Output without this patch: + Architecture: ppc64le + Byte Order: Little Endian + CPU(s): 128 + On-line CPU(s) list: 0-127 + Thread(s) per core: 8 + Core(s) per socket: 4 + Socket(s): 4 + NUMA node(s): 4 + Model: 8286-42A + ... + ... + +Output with this patch: + Architecture: ppc64le + Byte Order: Little Endian + CPU(s): 128 + On-line CPU(s) list: 0-127 + Thread(s) per core: 8 + Core(s) per socket: 4 + Socket(s): 4 + NUMA node(s): 4 + Model: 2.1 (pvr 004b 0201) + Model name: POWER8E (raw), altivec supported + ... + ... + +Upstream: http://github.com/karelzak/util-linux/commit/3ac03fe4d20558b55635a048d7f2fb0f5e85ee2a +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1326615 +Signed-off-by: Vasant Hegde +--- + sys-utils/lscpu.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c +index 4af8176..68b15af 100644 +--- a/sys-utils/lscpu.c ++++ b/sys-utils/lscpu.c +@@ -355,8 +355,13 @@ read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod) + else if (lookup(buf, "vendor_id", &desc->vendor)) ; + else if (lookup(buf, "family", &desc->family)) ; + else if (lookup(buf, "cpu family", &desc->family)) ; ++#if defined(__powerpc__) || defined(__powerpc64__) ++ else if (lookup(buf, "revision", &desc->model)) ; ++ else if (lookup(buf, "cpu", &desc->modelname)) ; ++#else + else if (lookup(buf, "model", &desc->model)) ; + else if (lookup(buf, "model name", &desc->modelname)) ; ++#endif + else if (lookup(buf, "stepping", &desc->stepping)) ; + else if (lookup(buf, "cpu MHz", &desc->mhz)) ; + else if (lookup(buf, "flags", &desc->flags)) ; /* x86 */ +-- +2.7.4