Re: [PATCH 3/3] arm64 cpuinfo: implement sysfs nodes for arm64

From: Will Deacon
Date: Mon Dec 09 2019 - 05:31:18 EST


On Fri, Dec 06, 2019 at 05:24:21PM +0100, Thomas Renninger wrote:
> From: Felix Schnizlein <fschnizlein@xxxxxxx>
>
> Export all information from /proc/cpuinfo to sysfs:
> implementer, architecture, variant, part, revision,
> bogomips and flags are exported.
>
> Example:
> /sys/devices/system/cpu/cpu1/info/:[0]# head *
> ==> architecture <==
> 8
>
> ==> bogomips <==
> 40.00
>
> ==> flags <==
> fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid asimdrdm
>
> ==> implementer <==
> 0x51
>
> ==> part <==
> 0xc00
>
> ==> revision <==
> 1
>
> ==> variant <==
> 0x0
>
> Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
> Signed-off-by: Felix Schnizlein <fschnizlein@xxxxxxxx>
> ---
> Documentation/ABI/testing/sysfs-devices-system-cpu | 22 +++++++++
> arch/arm64/Kconfig | 1 +
> arch/arm64/kernel/cpuinfo.c | 55 ++++++++++++++++++++++
> 3 files changed, 78 insertions(+)

I don't understand why we need this on arm64 and why it's an improvement
over all the other schemes we already support for identifying CPU features.

Given the pain we've endured over the years exposing this sort of stuff to
userspace, I'm relucant to add more just for the fun of it.

Will