[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86a5jijign.wl-maz@kernel.org>
Date: Tue, 18 Jun 2024 17:58:48 +0100
From: Marc Zyngier <maz@...nel.org>
To: Yangyu Chen <cyy@...self.name>
Cc: linux-arm-kernel@...ts.infradead.org,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Janne Grunau <j@...nau.net>,
Hector Martin <marcan@...can.st>,
Asahi Lina <lina@...hilina.net>,
asahi@...ts.linux.dev,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] drivers/perf: apple_m1: add known PMU events
On Tue, 18 Jun 2024 16:56:48 +0100,
Yangyu Chen <cyy@...self.name> wrote:
>
>
>
> > On Jun 18, 2024, at 22:03, Marc Zyngier <maz@...nel.org> wrote:
> >
> > On Tue, 18 Jun 2024 14:49:48 +0100,
> > Yangyu Chen <cyy@...self.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@...self.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.
Powered by blists - more mailing lists