linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Yangyu Chen <cyy@cyyself.name>
Cc: linux-arm-kernel@lists.infradead.org,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>, Janne Grunau <j@jannau.net>,
	Hector Martin <marcan@marcan.st>, Asahi Lina <lina@asahilina.net>,
	asahi@lists.linux.dev,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] drivers/perf: apple_m1: add known PMU events
Date: Tue, 18 Jun 2024 17:58:48 +0100	[thread overview]
Message-ID: <86a5jijign.wl-maz@kernel.org> (raw)
In-Reply-To: <tencent_B732B857317E21CB8D887CBF8228DAA78E08@qq.com>

On Tue, 18 Jun 2024 16:56:48 +0100,
Yangyu Chen <cyy@cyyself.name> wrote:
> 
> 
> 
> > On Jun 18, 2024, at 22:03, Marc Zyngier <maz@kernel.org> wrote:
> > 
> > On Tue, 18 Jun 2024 14:49:48 +0100,
> > Yangyu Chen <cyy@cyyself.name> wrote:
> >> 
> >> This patch adds known PMU events that can be found on /usr/share/kpep in
> >> macOS. The m1_pmu_events and m1_pmu_event_affinity are generated from
> >> the script [1], which consumes the plist file from Apple. And then added
> >> these events to m1_pmu_perf_map and m1_pmu_event_attrs with Apple's
> >> documentation [2].
> >> 
> >> Link: https://github.com/cyyself/m1-pmu-gen [1]
> >> Link: https://developer.apple.com/download/apple-silicon-cpu-optimization-guide/ [2]
> > 
> > This needs registration, and is thus impossible to freely visit.
> > 
> >> Signed-off-by: Yangyu Chen <cyy@cyyself.name>
> > 
> > What is the licence applicable to the original source file? Does it
> > explicitly allow redistribution in any form?
> > 
> 
> Oh. It's my fault. Sorry for the trouble caused.

No trouble on my side. I'm just painfully aware that this is a legal
landmine, and that what is perfectly allowed in one country may be a
punishable offence in another. And since I'm not a lawyer, I want to
see crystal clear things in writing.

> 
> > 
> > Other than the licensing concern, why should we bloat the kernel with
> > more of this stuff when everything is moving towards a bunch of JSON
> > files (tools/perf/pmu-events/arch/arm64).
> > 
> 
> Thanks for this hint. So, the thing to do might be to provide a
> generator that consumes Apple files and then generates a kernel
> patch for Linux perf tools to use rather than provide such details
> directly in the source code as you said from [1].
> 
> Link: https://lore.kernel.org/lkml/87czn18zev.wl-maz@kernel.org/ [1]

Even better: teach the perf tool to directly consume the plist file,
but don't distribute the file or its content. People owning such a
machine can fish the file from the machine itself (or the installer
can extract it from the OS image as if it was firmware data).

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.


  reply	other threads:[~2024-06-18 16:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 13:49 [PATCH v1] drivers/perf: apple_m1: add known PMU events Yangyu Chen
2024-06-18 14:03 ` Marc Zyngier
2024-06-18 15:56   ` Yangyu Chen
2024-06-18 16:58     ` Marc Zyngier [this message]
2024-07-28 11:00       ` Hector Martin
2024-07-28 12:19         ` Yangyu Chen
2024-07-31 17:56           ` Hector Martin

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=86a5jijign.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=asahi@lists.linux.dev \
    --cc=cyy@cyyself.name \
    --cc=j@jannau.net \
    --cc=lina@asahilina.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=mark.rutland@arm.com \
    --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 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).