lkml.org 
[lkml]   [2017]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] arm64: cpuinfo: display product info in /proc/cpuinfo
From
Date
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) {


\
 
 \ /
  Last update: 2017-09-27 12:42    [W:0.199 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site