From: Jon Mason <jon.mason@broadcom.com>
To: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [RFC 0/1] ARM: print MHz in /proc/cpuinfo
Date: Tue, 7 Jun 2016 17:08:32 -0400 [thread overview]
Message-ID: <1465333713-14339-1-git-send-email-jon.mason@broadcom.com> (raw)
Many users (and some applications) are expecting the CPU clock speed to
be output in /proc/cpuinfo (as is done in x86, avr32, c6x, tile, parisc,
ia64, and xtensa). This can be trivially added by simply querying the
clock described in the CPU node of the device tree. It appears that
many of the DTSI files in arch/arm/boot/dts already have this defined.
So, this will add this desired functionality for many boards with
already existing information. For those that do not have this defined,
it will simply not output the string in question (thus keeping
everything the same as before).
The output was modeled after x86 (based on number of significant digits
and location in the output), but is similar to other architectures. For
example, the output on my local board looks like:
# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 0 (v7l)
cpu MHz : 1200.000
BogoMIPS : 1200.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc09
CPU revision : 0
processor : 1
model name : ARMv7 Processor rev 0 (v7l)
cpu MHz : 1200.000
BogoMIPS : 1200.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc09
CPU revision : 0
Hardware : Broadcom Northstar Plus SoC
Revision : 0000
Serial : 0000000000000000
Thanks,
Jon
Jon Mason (1):
ARM: print MHz in /proc/cpuinfo
arch/arm/kernel/setup.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
--
1.9.1
next reply other threads:[~2016-06-07 21:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 21:08 Jon Mason [this message]
2016-06-07 21:08 ` [RFC 1/1] ARM: print MHz in /proc/cpuinfo Jon Mason
2016-06-08 8:34 ` Sudeep Holla
2016-06-08 19:31 ` Jon Mason
2016-06-09 9:09 ` Sudeep Holla
2016-06-09 17:36 ` Jon Mason
2016-06-07 22:18 ` [RFC 0/1] " Russell King - ARM Linux
2016-06-07 22:58 ` Jon Mason
2016-07-02 23:58 ` Jon Masters
2016-07-03 16:54 ` Russell King - ARM Linux
2016-07-03 18:49 ` Andrew Lunn
2016-07-03 19:10 ` Russell King - ARM Linux
2016-07-18 10:02 ` Pavel Machek
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=1465333713-14339-1-git-send-email-jon.mason@broadcom.com \
--to=jon.mason@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).