Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp56030rwb; Fri, 4 Aug 2023 09:07:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHIU4fu/f0Eie+EnKGQJd+BMweRG305VdWVjxofVSzJ/oza5Cwb2eHj08KaY+XnNZKwNde X-Received: by 2002:a17:906:77c1:b0:994:1844:549c with SMTP id m1-20020a17090677c100b009941844549cmr2009845ejn.0.1691165248875; Fri, 04 Aug 2023 09:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691165248; cv=none; d=google.com; s=arc-20160816; b=juEusphta6bPpQHQkVR2Pbzj/SKy7AyPDKBPP7N8f73eHK+Cl6VmCty0SLV9d6kDEJ V+QbsLKPSG6RH1ygvV+RuKfbE4q+OJErSjHNXJ+9L2NVpFvesuN9lKiVqumN8o1eQgg/ cu6AGp+4ZutBmTr3cWL52uNkcI1ExVSOiPeSXhW6eh6wCRsXObQuCdeG1D8eOsbOQVpQ 3f/MLetffPnFY6+muGripnBdYtZbdS8My982Ai3J7zzrsSUHXW/FoD2IK4kvFtaMVhoO 4oRaBTU+swXCVimp/gioUdkqcrjDATILXQ9ezX626xbveYTNlg0ZSum4Ww4dr/d9pSCH FqWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=a8rN6YBNzViBJXXZGhyO3pAWU3ac8kIPr7cF8Si+s7Y=; fh=YbZ48bGmsoz098rKV4kV2ThIvAku/hiLhng1lQjxNP0=; b=nWMs5d3+1bntlzf6uvBZGPPR72Twhk06Pkugphjk3GyjOcuSqV8hm27DTml4Ax0KzJ whZbJylL287LFsjdCjEDqxOx3ldL2oyxOd3UMqAKFX1oRjYX+xV24jQNRMsE72Jyourd G8gXGjCapxB9E0CTsBEtLPVdjihdmnYFDRynWwaEMVVIJQxACIq4myn21+Pki20jBjhR wMXM5Iu6kwxh4fQwXSRBf3iPOepuD2APHktYuX18fW2fJg2jU9mCx8XPOEWhrE3VU1kY CFA8TfnjzA8JwxNE7NsKOn5JuGOe05Xv1+pKbosxpf5/QbHR/DtsN5Jp7vd+leVZn02U IWYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170906c20600b00991e694a0a2si1945514ejz.240.2023.08.04.09.06.46; Fri, 04 Aug 2023 09:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232213AbjHDPzf (ORCPT + 99 others); Fri, 4 Aug 2023 11:55:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232281AbjHDPz2 (ORCPT ); Fri, 4 Aug 2023 11:55:28 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A8F349D7 for ; Fri, 4 Aug 2023 08:55:24 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4CE211007; Fri, 4 Aug 2023 08:56:06 -0700 (PDT) Received: from [10.57.3.154] (unknown [10.57.3.154]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3D6BA3F6C4; Fri, 4 Aug 2023 08:55:21 -0700 (PDT) Message-ID: Date: Fri, 4 Aug 2023 16:55:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 1/2] arm64/sysreg: Move TRFCR definitions to sysreg Content-Language: en-US To: Mark Brown Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Suzuki K Poulose , Mike Leach , Leo Yan , Alexander Shishkin , James Morse , Kristina Martsenko , Anshuman Khandual , Rob Herring , Jintack Lim , Joey Gouly , linux-kernel@vger.kernel.org References: <20230804085219.260790-1-james.clark@arm.com> <20230804085219.260790-2-james.clark@arm.com> <143152c8-61b8-4a71-9090-7203342b661c@sirena.org.uk> From: James Clark In-Reply-To: <143152c8-61b8-4a71-9090-7203342b661c@sirena.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/08/2023 13:10, Mark Brown wrote: > On Fri, Aug 04, 2023 at 09:52:16AM +0100, James Clark wrote: > >> TRFCR_EL2_CX needs to become TRFCR_ELx_CX to avoid unnecessary >> duplication and make the SysregFields block re-usable. > > That field is only present in the EL2 version. I would tend to leave > the registers split for that reason, there's some minor potential for > confusion if people refer to the sysreg file rather than the docs, or > potentially confuse some future automation. However that's not a super > strongly held opinion. > True, the potential for confusion is a good reason to not try to avoid duplication. Probably helps if it is ever auto generated or validated as well. I could update it on the next version. But do I leave all the existing _ELx usages in the code, or change them all to _EL1 (Except CX_EL2)? To leave them as _ELx sysreg would look like this, even though _EL1 would probably be more accurate: SysregFields TRFCR_EL2 Res0 63:7 UnsignedEnum 6:5 TS 0b0001 VIRTUAL 0b0010 GUEST_PHYSICAL 0b0011 PHYSICAL EndEnum Res0 4 Field 3 CX Res0 2 Field 1 E2TRE Field 0 E0TRE EndSysregFields SysregFields TRFCR_ELx Res0 63:7 UnsignedEnum 6:5 TS 0b0001 VIRTUAL 0b0010 GUEST_PHYSICAL 0b0011 PHYSICAL EndEnum Res0 4:2 Field 1 ExTRE Field 0 E0TRE EndSysregFields Sysreg TRFCR_EL1 3 0 1 2 1 Fields TRFCR_ELx EndSysreg Sysreg TRFCR_EL2 3 4 1 2 1 Fields TRFCR_EL2 EndSysreg Sysreg TRFCR_EL12 3 5 1 2 1 Fields TRFCR_ELx EndSysreg > Otherwise this checks out against DDI0601 2023-06: > > Reviewed-by: Mark Brown Thanks for the review