From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: [PATCH] lscpu: fix bogomips detection for s390
Date: Tue, 21 Jun 2011 13:24:33 +0200 [thread overview]
Message-ID: <20110621112433.GA4198@osiris.boeblingen.de.ibm.com> (raw)
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;
}
next reply other threads:[~2011-06-21 11:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 11:24 Heiko Carstens [this message]
2011-06-27 14:24 ` [PATCH] lscpu: fix bogomips detection for s390 Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110621112433.GA4198@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox