Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1416636

[RFC 0/1] ARM: print MHz in /proc/cpuinfo

From Jon Mason <jon.mason@broadcom.com>
Newsgroups linux.kernel
Subject [RFC 0/1] ARM: print MHz in /proc/cpuinfo
Date 2016-06-07 23:10 +0200
Message-ID <rHwq6-7Ly-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View 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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[RFC 0/1] ARM: print MHz in /proc/cpuinfo Jon Mason <jon.mason@broadcom.com> - 2016-06-07 23:10 +0200
  [RFC 1/1] ARM: print MHz in /proc/cpuinfo Jon Mason <jon.mason@broadcom.com> - 2016-06-07 23:10 +0200
    Re: [RFC 1/1] ARM: print MHz in /proc/cpuinfo Sudeep Holla <sudeep.holla@arm.com> - 2016-06-08 10:40 +0200
      Re: [RFC 1/1] ARM: print MHz in /proc/cpuinfo Jon Mason <jon.mason@broadcom.com> - 2016-06-08 21:40 +0200
        Re: [RFC 1/1] ARM: print MHz in /proc/cpuinfo Sudeep Holla <sudeep.holla@arm.com> - 2016-06-09 11:10 +0200
          Re: [RFC 1/1] ARM: print MHz in /proc/cpuinfo Jon Mason <jon.mason@broadcom.com> - 2016-06-09 19:40 +0200
  Re: [RFC 0/1] ARM: print MHz in /proc/cpuinfo Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-06-08 00:30 +0200
    Re: [RFC 0/1] ARM: print MHz in /proc/cpuinfo Jon Mason <jon.mason@broadcom.com> - 2016-06-08 01:00 +0200

csiph-web