Feature Request: Expose PM table registers through sysfs hwmon standard
I'm currently making an app for Ubuntu based on GTK4+ and libadwaita. Currently, to read the PM table, I need root privileges. I think this is necessary to protect writes to the module, as the potential for CPU damage is real. However, I think that reading the values should be accessible to regular users, as there is no real downside of allowing any user from reading the PM table/register values.
My request is to implement the sysfs interface hwmon directories and files in the Ryzen SMU module so that lm-sensors
can access all the PM table (and other attributes) parameters. I realise the complexity of identifying each processor and generating the hwmon directory structure in the kernel module, but I just want to flag this as a desirable outcome for any user of this module. Namely, a lot of applications GTKStressTest, Psensor and others could then leverage the PM table attributes with minimal effort.
I am still wanting to push on with my GUI utility. I will experiment with manually setting file permissions in the Ryzen SMU module for now, thinking about general extensibility would enable easy use by the broader Linux community by being able to autodiscover the parameters exposed in hwmon.