From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C56C51CA80; Tue, 18 Jun 2024 16:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729931; cv=none; b=aAR9lZ9Dx3nWemWKV6XHYDgSGOmm7/LtICEBU607f5VofqXhHPCz8KvTHFt1hBn+h42oERgOBG9GMPK1zanIlhrIzAQpza5x7N4jmnCDyKCl2aUmNWEpLjv7w6HwBxk+u+4Go+oiVS6+CawuiVr3Ozg2X4t0nHgj9cPHGQYqA3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729931; c=relaxed/simple; bh=HUSLsoHEBphDF7AIL00Gd1xw/PCbbcwFvhAdMPxZLHw=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=TD3j9Y9jPKrZ47biAUqLAj07CHvn5wZ76nNcYLI895Z7x47pdDX0+qjy6cKCWPWsLq77JXhSp2iXTOAuhrocy+Yh/I16ffmR15KbwLZr6n2VtS1WJqBNTrE2GyaJ7+o67Ms8ZPC6dTqE/BoBLUblrC1znr+V09q+DRdhBlsYO+Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ftB1pqMO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ftB1pqMO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5136BC3277B; Tue, 18 Jun 2024 16:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718729931; bh=HUSLsoHEBphDF7AIL00Gd1xw/PCbbcwFvhAdMPxZLHw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ftB1pqMOMVuFj9y075HlNcOcFr8XPghH0TZViiVVV5joaQZLLCu1h/6mS7nLESXA7 L6pag8KEAEofESSgT8Fo52Adf3WcWhFtz9MfvKPQ8+VzKbdlZOjrCZ2HrGpA/Ue8Hc BqXnUfKhmGJqy8kTT23WbexklPUTEXi7x2RBoN7eBAhjfPS4zkhgIwuI8hLnSePzX8 uy80k8LdLEZWGMG6jGXCMzdeizWqJwNBDAFhbgVlg5HyGcbqLmajux0c0a7KagQghR S9xGARZ0apAFDeZBx9iN7f/o71718I4lD/oDEn9heYeFMv9aKsBpA7+BhQ8aXMD8f0 ifDKn+1ZIlbcQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sJcAS-0053bW-Kz; Tue, 18 Jun 2024 17:58:48 +0100 Date: Tue, 18 Jun 2024 17:58:48 +0100 Message-ID: <86a5jijign.wl-maz@kernel.org> From: Marc Zyngier To: Yangyu Chen Cc: linux-arm-kernel@lists.infradead.org, Will Deacon , Mark Rutland , Janne Grunau , Hector Martin , Asahi Lina , asahi@lists.linux.dev, Linux Kernel Mailing List Subject: Re: [PATCH v1] drivers/perf: apple_m1: add known PMU events In-Reply-To: References: <86bk3yjqkn.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: cyy@cyyself.name, linux-arm-kernel@lists.infradead.org, will@kernel.org, mark.rutland@arm.com, j@jannau.net, marcan@marcan.st, lina@asahilina.net, asahi@lists.linux.dev, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 18 Jun 2024 16:56:48 +0100, Yangyu Chen wrote: > > > > > On Jun 18, 2024, at 22:03, Marc Zyngier wrote: > > > > On Tue, 18 Jun 2024 14:49:48 +0100, > > Yangyu Chen 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 > > > > 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.