From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 912B7C27C4F for ; Tue, 18 Jun 2024 16:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hBnWm192mHZzHNjS0tBNvzsnqA8ogdYKeXvN9kzyhg8=; b=GzfVR4yNllEEZSYBdoxZ2Qs1RI VUW9eW/S0lE7oR6DF4ZT/VF89xOTYcxbRZn7K2uLv7X1cMaA8UVr1k8hBkhsGRSJCh1MgjlGCUGKE 4YzkFhRazA8DpDQNc7G9it8FFgEwbzrr/yigdODciVekA4H7azA4CL/bagIhmmwRA58VT+s3x+ZcZ P2MGfBmTxoSJbOosqSPn5OwTH/v0AXKEaJPsa3lYSw48ZiD9R7sscqUXIpat63lRyZj0rev7cuG1d 0AdV+0J8rtasJXuFY3xU5gQLeUNiGV/KpYfr0j8H2MRGfU9dhAXzcNYK4gauV5yj/lOHEYJkGDNb/ jImap44A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJcAa-0000000FxI8-2eiK; Tue, 18 Jun 2024 16:58:56 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJcAW-0000000FxG6-28Z6 for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2024 16:58:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A32D261A02; Tue, 18 Jun 2024 16:58:51 +0000 (UTC) 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_095852_753236_4FACD402 X-CRM114-Status: GOOD ( 30.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.