]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: Fix model and model name on Power Systems
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>
Mon, 14 Mar 2016 14:48:07 +0000 (20:18 +0530)
committerKarel Zak <kzak@redhat.com>
Mon, 14 Mar 2016 15:17:19 +0000 (16:17 +0100)
commit3ac03fe4d20558b55635a048d7f2fb0f5e85ee2a
treed2b531b930de8914467ad23a53e8f52357d78795
parent79d8593fd76e6b3d2fb10c89c47dde55b5138487
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
  ...
  ...

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
sys-utils/lscpu.c