All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaokun Zhang <zhangshaokun@hisilicon.com>
To: John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>,
	"Rob Herring" <robh@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>, <devicetree@vger.kernel.org>,
	"Joakim Zhang" <qiangqing.zhang@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
Date: Thu, 28 May 2020 09:35:13 +0800	[thread overview]
Message-ID: <36a5bf0c-fcf5-ad74-b5ee-1b4502705aec@hisilicon.com> (raw)
In-Reply-To: <51aa7cbc-0ce2-b96d-b056-fcc6013ccecf@huawei.com>

Hi,

On 2020/5/27 22:34, John Garry wrote:
>>>>>
>>>>> 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.
>>
> 
> BTW, Shaokun now tells me that the HiSi uncore PMU HW have such registers to identify the implementation. I didn't know.
> 

Right, we have this register which shows the PMU version.

Thanks,
Shaokun


> So we could add that identifier file for those PMUs as proof-of-concept, exposing that register.
> 
> As for other PMUs which I'm interested in, again, future versions should have such registers to self-identify.
> 
> So using something derived from the DT compat string would hopefully be the uncommon case.
> 
> Cheers,
> John
> 
> .
> 


WARNING: multiple messages have this Message-ID (diff)
From: Shaokun Zhang <zhangshaokun@hisilicon.com>
To: John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>,
	"Rob Herring" <robh@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org,
	Joakim Zhang <qiangqing.zhang@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
Date: Thu, 28 May 2020 09:35:13 +0800	[thread overview]
Message-ID: <36a5bf0c-fcf5-ad74-b5ee-1b4502705aec@hisilicon.com> (raw)
In-Reply-To: <51aa7cbc-0ce2-b96d-b056-fcc6013ccecf@huawei.com>

Hi,

On 2020/5/27 22:34, John Garry wrote:
>>>>>
>>>>> 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.
>>
> 
> BTW, Shaokun now tells me that the HiSi uncore PMU HW have such registers to identify the implementation. I didn't know.
> 

Right, we have this register which shows the PMU version.

Thanks,
Shaokun


> So we could add that identifier file for those PMUs as proof-of-concept, exposing that register.
> 
> As for other PMUs which I'm interested in, again, future versions should have such registers to self-identify.
> 
> So using something derived from the DT compat string would hopefully be the uncommon case.
> 
> Cheers,
> John
> 
> .
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-28  1:35 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  7:31 [PATCH V1 RESEND 0/3] perf/imx_ddr: Add system PMU support Joakim Zhang
2020-05-12  7:31 ` Joakim Zhang
2020-05-12  7:31 ` [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace Joakim Zhang
2020-05-12  7:31   ` Joakim Zhang
2020-05-19 18:51   ` Rob Herring
2020-05-19 18:51     ` Rob Herring
2020-05-20  2:56     ` Joakim Zhang
2020-05-20  2:56       ` Joakim Zhang
2020-05-20 15:10       ` Rob Herring
2020-05-20 15:10         ` Rob Herring
2020-05-20  7:33     ` Will Deacon
2020-05-20  7:33       ` Will Deacon
2020-05-20 15:23       ` Rob Herring
2020-05-20 15:23         ` Rob Herring
2020-05-21 13:04         ` Will Deacon
2020-05-21 13:04           ` Will Deacon
2020-05-21 14:00           ` John Garry
2020-05-21 14:00             ` John Garry
2020-05-27 14:34             ` John Garry
2020-05-27 14:34               ` John Garry
2020-05-28  1:35               ` Shaokun Zhang [this message]
2020-05-28  1:35                 ` Shaokun Zhang
2020-05-21 13:26       ` Mark Rutland
2020-05-21 13:26         ` Mark Rutland
2020-05-21 14:16         ` John Garry
2020-05-21 14:16           ` John Garry
2020-05-12  7:31 ` [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string Joakim Zhang
2020-05-12  7:31   ` Joakim Zhang
2020-05-19 18:47   ` Rob Herring
2020-05-19 18:47     ` Rob Herring
2020-07-15 11:03   ` John Garry
2020-07-15 11:03     ` John Garry
2020-07-20  8:57     ` Joakim Zhang
2020-07-20  8:57       ` Joakim Zhang
2020-05-12  7:31 ` [PATCH V1 RESEND 3/3] arch: arm64: imx8mq/m/n: remove unused " Joakim Zhang
2020-05-12  7:31   ` Joakim Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36a5bf0c-fcf5-ad74-b5ee-1b4502705aec@hisilicon.com \
    --to=zhangshaokun@hisilicon.com \
    --cc=devicetree@vger.kernel.org \
    --cc=john.garry@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=qiangqing.zhang@nxp.com \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.