Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH] lscpu: fix bogomips detection for s390
@ 2011-06-21 11:24 Heiko Carstens
  2011-06-27 14:24 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Carstens @ 2011-06-21 11:24 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

From: Heiko Carstens <heiko.carstens@de.ibm.com>

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.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 027a298..1481fef 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -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;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-27 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-21 11:24 [PATCH] lscpu: fix bogomips detection for s390 Heiko Carstens
2011-06-27 14:24 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox