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 X-Spam-Level: X-Spam-Status: No, score=-22.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91236C433E3 for ; Wed, 24 Mar 2021 19:05:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 656A361A1D for ; Wed, 24 Mar 2021 19:05:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237790AbhCXTE4 (ORCPT ); Wed, 24 Mar 2021 15:04:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:59292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237641AbhCXTEi (ORCPT ); Wed, 24 Mar 2021 15:04:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 36CB3619B1; Wed, 24 Mar 2021 19:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616612677; bh=3QCrUi4hLzDRYFZDg+NEvYrrrdirK6b8d2l2R7Oezz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ncVwdGNqeKq1W9b9rlLUWAStvLK2lkVj4gRYh2ReLX67sC0/f14x/6g63g809s3U/ VyBNjz2tNFAG3tWGToDJAbzIusqCqZBBioW8C3+DLs+Got3divf6k2Ue47icKFOjvL ufWIrW6Jcer6K2xfngMVpH2wokF4bP2RPKuxgmnBX8/hsp7/AY0SYqOd+tTQrdlhxR TXpC3iPBmPr046slX6jo4edSE1giarYPxVAdVy54qJWGoK5BqCB9pZmYkGPm/hmBLy j+1YOqkwsOi7iAR04GLL5sxanzPcLOXi1ay31LVYOLUsFhnHOEGUyQsEx3mhEzFdka 657QSJXUALvrQ== Date: Wed, 24 Mar 2021 19:04:30 +0000 From: Will Deacon To: Mark Rutland Cc: Hector Martin , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Rob Herring , Arnd Bergmann , Olof Johansson , Krzysztof Kozlowski , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Linus Walleij , Andy Shevchenko , Greg Kroah-Hartman , Jonathan Corbet , Catalin Marinas , Christoph Hellwig , "David S. Miller" , devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-doc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFT PATCH v3 13/27] arm64: Add Apple vendor-specific system registers Message-ID: <20210324190428.GG13181@willie-the-truck> References: <20210304213902.83903-1-marcan@marcan.st> <20210304213902.83903-14-marcan@marcan.st> <20210324183818.GF13181@willie-the-truck> <20210324185921.GA27297@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210324185921.GA27297@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 24, 2021 at 06:59:21PM +0000, Mark Rutland wrote: > On Wed, Mar 24, 2021 at 06:38:18PM +0000, Will Deacon wrote: > > On Fri, Mar 05, 2021 at 06:38:48AM +0900, Hector Martin wrote: > > > Apple ARM64 SoCs have a ton of vendor-specific registers we're going to > > > have to deal with, and those don't really belong in sysreg.h with all > > > the architectural registers. Make a new home for them, and add some > > > registers which are useful for early bring-up. > > > > > > Signed-off-by: Hector Martin > > > --- > > > MAINTAINERS | 1 + > > > arch/arm64/include/asm/sysreg_apple.h | 69 +++++++++++++++++++++++++++ > > > 2 files changed, 70 insertions(+) > > > create mode 100644 arch/arm64/include/asm/sysreg_apple.h > > > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > index aec14fbd61b8..3a352c687d4b 100644 > > > --- a/MAINTAINERS > > > +++ b/MAINTAINERS > > > @@ -1646,6 +1646,7 @@ B: https://github.com/AsahiLinux/linux/issues > > > C: irc://chat.freenode.net/asahi-dev > > > T: git https://github.com/AsahiLinux/linux.git > > > F: Documentation/devicetree/bindings/arm/apple.yaml > > > +F: arch/arm64/include/asm/sysreg_apple.h > > > > (this isn't needed with my suggestion below). > > > > > ARM/ARTPEC MACHINE SUPPORT > > > M: Jesper Nilsson > > > diff --git a/arch/arm64/include/asm/sysreg_apple.h b/arch/arm64/include/asm/sysreg_apple.h > > > new file mode 100644 > > > index 000000000000..48347a51d564 > > > --- /dev/null > > > +++ b/arch/arm64/include/asm/sysreg_apple.h > > > > I doubt apple are the only folks doing this, so can we instead have > > sysreg-impdef.h please, and then have an Apple section in there for these > > registers? That way, we could also have an imp_sys_reg() macro to limit > > CRn to 11 or 15, which is the reserved encoding space for these registers. > > > > We'll cc you for any patches touching the Apple parts, as we don't have > > the first clue about what's hiding in there. > > For existing IMP-DEF sysregs (e.g. the Kryo L2 control registers), we've > put the definitions in the drivers, rather than collating > non-architectural bits under arch/arm64/. Yeah, but we could include those here as well. > So far we've kept arch/arm64/ largely devoid of IMP-DEF bits, and it > seems a shame to add something with the sole purpose of collating that, > especially given arch code shouldn't need to touch these if FW and > bootloader have done their jobs right. > > Can we put the definitions in the relevant drivers? That would sidestep > any pain with MAINTAINERS, too. If we can genuinely ignore these in arch code, then sure. I just don't know how long that is going to be the case, and ending up in a situation where these are scattered randomly throughout the tree sounds horrible to me. Will 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 X-Spam-Level: X-Spam-Status: No, score=-20.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 476C5C433C1 for ; Wed, 24 Mar 2021 19:06:29 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C06B8619B1 for ; Wed, 24 Mar 2021 19:06:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C06B8619B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KOc4ieL+niv2ymHmdwdadeQkFUphjPGPCIqR3zRJ4XU=; b=kxNPRfY2VXR3EWfHmC6eVpck9 tI6SjJWSMWPBgBuyywQKgfipVGvwGkn1Ju2rig1jWiOzQWfXI1lvN/C8MWMj6cOyNu99s2UWC0KWE NHOMGm3eZx+nkjmeC++hl0/0B8VoxAdRsk+ogrqa9GVWIqId/sap/Sqjpcs/LiVw89FvWCxNn2BnR cSQbOqp4dZOxwJtOIQyZ95DTiy65Xas9hsAYurnRVs91gZw99rd+gFlJReJT1x5xN6F8gBwhfJn68 Ax2T9Kr/EBFWTeSbWq3OT5oK32EsmppGU5yUMBPjiYfrBDSux/GaANlOPiE0yuW4lhQUbm+5UG+qf TTPydDc6A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lP8oA-0006Fz-4w; Wed, 24 Mar 2021 19:04:46 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lP8o3-0006FA-3z for linux-arm-kernel@lists.infradead.org; Wed, 24 Mar 2021 19:04:42 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 36CB3619B1; Wed, 24 Mar 2021 19:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616612677; bh=3QCrUi4hLzDRYFZDg+NEvYrrrdirK6b8d2l2R7Oezz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ncVwdGNqeKq1W9b9rlLUWAStvLK2lkVj4gRYh2ReLX67sC0/f14x/6g63g809s3U/ VyBNjz2tNFAG3tWGToDJAbzIusqCqZBBioW8C3+DLs+Got3divf6k2Ue47icKFOjvL ufWIrW6Jcer6K2xfngMVpH2wokF4bP2RPKuxgmnBX8/hsp7/AY0SYqOd+tTQrdlhxR TXpC3iPBmPr046slX6jo4edSE1giarYPxVAdVy54qJWGoK5BqCB9pZmYkGPm/hmBLy j+1YOqkwsOi7iAR04GLL5sxanzPcLOXi1ay31LVYOLUsFhnHOEGUyQsEx3mhEzFdka 657QSJXUALvrQ== Date: Wed, 24 Mar 2021 19:04:30 +0000 From: Will Deacon To: Mark Rutland Cc: Hector Martin , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Rob Herring , Arnd Bergmann , Olof Johansson , Krzysztof Kozlowski , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Linus Walleij , Andy Shevchenko , Greg Kroah-Hartman , Jonathan Corbet , Catalin Marinas , Christoph Hellwig , "David S. Miller" , devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-doc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFT PATCH v3 13/27] arm64: Add Apple vendor-specific system registers Message-ID: <20210324190428.GG13181@willie-the-truck> References: <20210304213902.83903-1-marcan@marcan.st> <20210304213902.83903-14-marcan@marcan.st> <20210324183818.GF13181@willie-the-truck> <20210324185921.GA27297@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210324185921.GA27297@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210324_190439_537407_C797D451 X-CRM114-Status: GOOD ( 28.21 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 24, 2021 at 06:59:21PM +0000, Mark Rutland wrote: > On Wed, Mar 24, 2021 at 06:38:18PM +0000, Will Deacon wrote: > > On Fri, Mar 05, 2021 at 06:38:48AM +0900, Hector Martin wrote: > > > Apple ARM64 SoCs have a ton of vendor-specific registers we're going to > > > have to deal with, and those don't really belong in sysreg.h with all > > > the architectural registers. Make a new home for them, and add some > > > registers which are useful for early bring-up. > > > > > > Signed-off-by: Hector Martin > > > --- > > > MAINTAINERS | 1 + > > > arch/arm64/include/asm/sysreg_apple.h | 69 +++++++++++++++++++++++++++ > > > 2 files changed, 70 insertions(+) > > > create mode 100644 arch/arm64/include/asm/sysreg_apple.h > > > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > index aec14fbd61b8..3a352c687d4b 100644 > > > --- a/MAINTAINERS > > > +++ b/MAINTAINERS > > > @@ -1646,6 +1646,7 @@ B: https://github.com/AsahiLinux/linux/issues > > > C: irc://chat.freenode.net/asahi-dev > > > T: git https://github.com/AsahiLinux/linux.git > > > F: Documentation/devicetree/bindings/arm/apple.yaml > > > +F: arch/arm64/include/asm/sysreg_apple.h > > > > (this isn't needed with my suggestion below). > > > > > ARM/ARTPEC MACHINE SUPPORT > > > M: Jesper Nilsson > > > diff --git a/arch/arm64/include/asm/sysreg_apple.h b/arch/arm64/include/asm/sysreg_apple.h > > > new file mode 100644 > > > index 000000000000..48347a51d564 > > > --- /dev/null > > > +++ b/arch/arm64/include/asm/sysreg_apple.h > > > > I doubt apple are the only folks doing this, so can we instead have > > sysreg-impdef.h please, and then have an Apple section in there for these > > registers? That way, we could also have an imp_sys_reg() macro to limit > > CRn to 11 or 15, which is the reserved encoding space for these registers. > > > > We'll cc you for any patches touching the Apple parts, as we don't have > > the first clue about what's hiding in there. > > For existing IMP-DEF sysregs (e.g. the Kryo L2 control registers), we've > put the definitions in the drivers, rather than collating > non-architectural bits under arch/arm64/. Yeah, but we could include those here as well. > So far we've kept arch/arm64/ largely devoid of IMP-DEF bits, and it > seems a shame to add something with the sole purpose of collating that, > especially given arch code shouldn't need to touch these if FW and > bootloader have done their jobs right. > > Can we put the definitions in the relevant drivers? That would sidestep > any pain with MAINTAINERS, too. If we can genuinely ignore these in arch code, then sure. I just don't know how long that is going to be the case, and ending up in a situation where these are scattered randomly throughout the tree sounds horrible to me. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel