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


Groups > linux.kernel > #1740598

Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo

From Robin Murphy <robin.murphy@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo
Date 2017-09-27 12:50 +0200
Message-ID <uui4F-1h8-9@gated-at.bofh.it> (permalink)
References <uu6wx-2em-3@gated-at.bofh.it> <uu6wy-2em-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 26/09/17 23:23, Al Stone wrote:
> While it is very useful to know what CPU is being used, it is also
> useful to know who made the platform being used.  On servers, this
> can point to the right person to contact when a server is having
> trouble.
> 
> Go get the product info -- manufacturer, product name and version --
> from DMI (aka SMBIOS) and display it in /proc/cpuinfo.  To look more
> like other server platforms, include the CPU type and frequency when
> displaying the product info, too.
> 
> Signed-off-by: Al Stone <ahs3@redhat.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> ---
[...]
> @@ -190,6 +298,31 @@ static int c_show(struct seq_file *m, void *v)
>  			seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
>  				   MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);
>  
> +		if (IS_ENABLED(CONFIG_DMI)) {
> +			seq_puts(m, "product name\t: ");
> +
> +			if (!dmi_product_info)
> +				get_dmi_product_info();
> +			if (dmi_product_info)
> +				seq_printf(m, "%s", dmi_product_info);
> +			else
> +				seq_puts(m, "<unknown>");
> +
> +			seq_printf(m, ", ARM 8.%d (r%dp%d) CPU",
> +				   MIDR_VARIANT(midr),
> +				   MIDR_VARIANT(midr),
> +				   MIDR_REVISION(midr));

What is "ARM 8.1" meant to infer for, say, a typical Cortex-A57?

Robin.

> +
> +			if (!dmi_max_mhz)
> +				dmi_max_mhz = get_dmi_max_mhz();
> +			if (dmi_max_mhz)
> +				seq_printf(m, " @ %d.%02dGHz\n",
> +					   (int)(dmi_max_mhz / 1000),
> +					   (int)(dmi_max_mhz % 1000));
> +			else
> +				seq_puts(m, " @ <unknown>GHz\n");
> +		}
> +
>  		impl = (u8) MIDR_IMPLEMENTOR(midr);
>  		for (j = 0; hw_implementer[j].id != 0; j++) {
>  			if (hw_implementer[j].id == impl) {

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


Thread

[PATCH 0/3] arm64: cpuinfo: make /proc/cpuinfo more human-readable Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
  [PATCH 1/3] arm64: cpuinfo: add MPIDR value to /proc/cpuinfo Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
    Re: [PATCH 1/3] arm64: cpuinfo: add MPIDR value to /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 13:40 +0200
  [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
    Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Florian Fainelli <f.fainelli@gmail.com> - 2017-09-27 02:50 +0200
    Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Robin Murphy <robin.murphy@arm.com> - 2017-09-27 12:50 +0200
      Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 15:50 +0200
    Re: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 13:40 +0200
  [PATCH 2/3] arm64: cpuinfo: add human readable CPU names to /proc/cpuinfo Al Stone <ahs3@redhat.com> - 2017-09-27 00:30 +0200
    Re: [PATCH 2/3] arm64: cpuinfo: add human readable CPU names to  /proc/cpuinfo Robin Murphy <robin.murphy@arm.com> - 2017-09-27 12:40 +0200
    Re: [PATCH 2/3] arm64: cpuinfo: add human readable CPU names to  /proc/cpuinfo Mark Rutland <mark.rutland@arm.com> - 2017-09-27 13:30 +0200
  Re: [PATCH 0/3] arm64: cpuinfo: make /proc/cpuinfo more  human-readable Mark Rutland <mark.rutland@arm.com> - 2017-09-27 12:40 +0200

csiph-web