Skip to contentSkip to conversation

lscpu: fix bogomips detection for s390

PATCH Applied Heiko Carstens 2 participants 2 messages Jun 21, 2011 – Jun 27, 2011 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lscpu: fix bogomips detection for s390

From: Heiko Carstens <[email protected]>

s390 has a "bogomips per cpu" string instead of a "bogomips" string in /proc/sysinfo. So add a second bogomips lookup which detects the s390 variant.

---
 sys-utils/lscpu.c |    2 ++
 1 file changed, 2 insertions(+)
sys-utils/lscpu.c +2 -0
index 027a298..1481fef 100644
@@ -369,6 +369,8 @@ read_basicinfo(struct lscpu_desc *desc)
 		else if (lookup(buf, "cpu MHz", &desc->mhz)) ;
 		else if (lookup(buf, "flags", &desc->flags)) ;
 		else if (lookup(buf, "bogomips", &desc->bogomips)) ;
+		/* S390 */
+		else if (lookup(buf, "bogomips per cpu", &desc->bogomips)) ;
 		else
 			continue;
 	}
maintainer Applied
#1 lore raw
Quoted 2 lines · Heiko Carstens
 sys-utils/lscpu.c |    2 ++
 1 file changed, 2 insertions(+)

Applied, thanks.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com