linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Robin Murphy <robin.murphy@arm.com>,
	Jing Zhang <renyu.zj@linux.alibaba.com>,
	Ian Rogers <irogers@google.com>, Will Deacon <will@kernel.org>,
	Shuai Xue <xueshuai@linux.alibaba.com>
Cc: James Clark <james.clark@arm.com>,
	Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Ilkka Koskinen <ilkka@os.amperecomputing.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org,
	Zhuo Song <zhuo.song@linux.alibaba.com>
Subject: Re: [PATCH v2 1/5] driver/perf: Add identifier sysfs file for CMN
Date: Fri, 5 May 2023 13:24:18 +0100	[thread overview]
Message-ID: <98eaaa87-ae33-5479-dee0-71e42bc5d798@oracle.com> (raw)
In-Reply-To: <6bb7eaee-2d00-46f5-89ff-95133aea9a5d@arm.com>

On 04/05/2023 13:15, Robin Murphy wrote:
>>
>> ok, I see, that's what I was asking about in the cmn-700 JSON review; 
>> and from what you say, it is not the case that we always have the same 
>> events for every revision. So we need a more fine-grained identifier.
> 
> Yes, it's mostly just a case of new events getting added as the 
> microarchitecture evolves over the product's lifetime,

I might have mentioned this before: Currently userspace matches both the 
PMU sysfs name and this HW identifier for creating these event aliases. 
For fixed events - like those non-IMPDEF ones on the PMCG - userspace 
could just assume those standard ones are implemented and not need to 
check the HW identifier. Maybe this will help with scalability of JSONs 
for CMN PMU implementations. Or even HW identifier wildcard matching. 
However, as you might anticipate, we may need to add some sort of 
userspace support for times when HW implementations get messed up...

> but there has 
> been at least one event ID which had a meaning in very early versions of 
> CMN-600, was subsequently removed, and then got reused for a *different* 
> event a couple of revisions after that.
> Thankfully I believe those 
> earliest versions only ever existed on FPGA internally, and the TRMs 
> were never made public, so upstream doesn't care about that specific case.

ok, good

> 
>> For DT support, I suppose per-revision compat strings could be added, 
>> but I would not be sure what to do about ACPI.
> 
> We know the version from the ID registers, that's no problem - it's 
> already used to manage visibility of the sysfs event aliases. In 
> principle we *should* have a model code in CFGM_PERIPH_ID_0 as well, and 
> be able to compose an identifier exactly the same way as 
> smmu_pmu_get_iidr() does in the SMMUv3 PMCG driver, but as I mentioned 
> before I'm not entirely confident in the implementation: I do happen to 
> know what codes have been nominally assigned for each product, but the 
> TRMs claim otherwise 🙁

Thanks,
John

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

  reply	other threads:[~2023-05-05 12:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24  9:44 [PATCH v2 0/5] Add JSON metrics for arm CMN and Yitian710 DDR Jing Zhang
2023-04-24  9:44 ` [PATCH v2 1/5] driver/perf: Add identifier sysfs file for CMN Jing Zhang
2023-05-01 12:38   ` John Garry
2023-05-04  9:47     ` Robin Murphy
2023-05-04 11:02       ` John Garry
2023-05-04 12:15         ` Robin Murphy
2023-05-05 12:24           ` John Garry [this message]
2023-04-24  9:44 ` [PATCH v2 2/5] perf vendor events: Add JSON metrics for CMN-700 Jing Zhang
2023-05-01 12:27   ` John Garry
2023-04-24  9:44 ` [PATCH v2 3/5] driver/perf: Add identifier sysfs file for Yitian 710 DDR Jing Zhang
2023-05-01 12:31   ` John Garry
2023-05-04  7:21   ` Shuai Xue
2023-04-24  9:44 ` [PATCH v2 4/5] perf jevents: Add support for Yitian 710 DDR PMU aliasing Jing Zhang
2023-05-01 12:29   ` John Garry
2023-05-04  7:18   ` Shuai Xue
2023-04-24  9:44 ` [PATCH v2 5/5] perf vendor events: Add JSON metrics for Yitian 710 DDR Jing Zhang
2023-05-01 12:28   ` John Garry
2023-05-04  7:31   ` Shuai Xue
2023-04-29 21:01 ` [PATCH v2 0/5] Add JSON metrics for arm CMN and Yitian710 DDR Ian Rogers

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=98eaaa87-ae33-5479-dee0-71e42bc5d798@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ilkka@os.amperecomputing.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=namhyung@kernel.org \
    --cc=renyu.zj@linux.alibaba.com \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    --cc=xueshuai@linux.alibaba.com \
    --cc=zhuo.song@linux.alibaba.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).