Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21/05/2020 14:04, Will Deacon wrote:
On Wed, May 20, 2020 at 09:23:41AM -0600, Rob Herring wrote:
On Wed, May 20, 2020 at 1:33 AM Will Deacon <will@xxxxxxxxxx> wrote:

On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote:
On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
+static ssize_t ddr_perf_identifier_show(struct device *dev,
+                                   struct device_attribute *attr,
+                                   char *page)
+{
+   struct ddr_pmu *pmu = dev_get_drvdata(dev);
+
+   return sprintf(page, "%s\n", pmu->devtype_data->identifier);

Why do we need yet another way to identify the SoC from userspace?

I also really dislike this. What's the preferred way to identify the SoC
from userspace?

/proc/cpuinfo? ;)

The *SoC*!

For an non-firmware specific case, I'd say soc_device should be. I'd
guess ACPI systems don't use it and for them it's dmidecode typically.
The other problem I have with soc_device is it is optional.


Hi Will,

John -- what do you think about using soc_device to expose this information,
with ACPI systems using DMI data instead?

Generally I don't think that DMI is reliable, and I saw this as the least preferred choice. I'm looking at the sysfs DMI info for my dev board, and I don't even see anything like a SoC identifier.

As for the event_source device sysfs identifier file, it would not always contain effectively the same as the SoC ID.

Certain PMUs which I'm interested in plan to have probe-able identification info available in future.

Thanks,
John






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux