ksysfs: Expose hardware name
Userspace tools often require a short, descriptive name of the hardware
platform. Currently, this information is fragmented: Device Tree-based
platforms typically use /proc/device-tree/model, while x86 platforms
combine multiple values from /sys/class/dmi/id/. There is no uniform,
platform-agnostic way to retrieve this string.
The kernel already maintains dump_stack_arch_desc_str[], which contains
the model name or DMI values used for the "Hardware name:" field in
stack traces.
Expose dump_stack_arch_desc_str[] at /sys/kernel/hardware_name to
provide userspace with a consistent interface for identifying the
underlying hardware.
Signed-off-by: Richard Weinberger <richard@nod.at>
4 files changed