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 6A8A9C4332F for ; Fri, 9 Dec 2022 12:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=cXH0/0XClptJkVShIqA7xJVgzEWf80aTFtA3xN8Kfrk=; b=Gukthd1P2BHklw AHUGw44LoMZf3wHq3O9J2IWIKaOAIGJYA4J3JNtZRui2O5Ux6Fa/quRGZ8Om6gIYqDp/W9O0uxAb4 qR624V0IKLbqu/jNEiOmKh4IvgBGYlSOv7FYcA+qBHJIkyus1n1/l6de3NAAhsyK74IoqumNsSOQf FNYBaSGpXyP04UcXlDpaB6Uv8Nm+XBpToVj45oG9xvxiGNkK632GHfxngRrSkoYhpaiDbyMoUFl70 QFLRNvtGH2btF/i9cURUXFkjF6euvss1JyI/txV1SPsVRhft3zg8INbC0ltWwA5/s0dlG7ZwmFOxg ak+ZDMAyuTM84nsUo6xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3cho-007ckV-0H; Fri, 09 Dec 2022 12:42:20 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3chk-007cjO-Gh for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 12:42:18 +0000 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 B0F5223A; Fri, 9 Dec 2022 04:42:20 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.39.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CD2223F73B; Fri, 9 Dec 2022 04:42:12 -0800 (PST) Date: Fri, 9 Dec 2022 12:42:10 +0000 From: Mark Rutland To: Mark Brown Cc: Catalin Marinas , Will Deacon , Suzuki K Poulose , James Morse , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 4/6] arm64/sysreg: Annotate signed enumerations Message-ID: References: <20221207-arm64-sysreg-helpers-v1-0-149fa1308a23@kernel.org> <20221207-arm64-sysreg-helpers-v1-4-149fa1308a23@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221207-arm64-sysreg-helpers-v1-4-149fa1308a23@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_044216_621092_9FF6B9C3 X-CRM114-Status: GOOD ( 19.66 ) 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 Thu, Dec 08, 2022 at 04:03:25PM +0000, Mark Brown wrote: > ID_AA64PFR0_EL1.FP and ID_AA64PFR0_EL1.AdvSIMD are both signed enumerations, > specify them as such in sysreg. There are other signed enumerations in the > registers but these are the only ones for which we currently use FTR_SIGNED, > others can be fixed up incrementally. Can we please do that in one go (either in one patch or a set of patches in this series)? I appreciate that's more work up-front, but doing that will mean that all the definitions are in a consistent state, which'll be far less error prone going forwards -- people will *definitely* forget to change the other existing definitions to be SIGNED if all that is hidden at the point-of-use. If we do that, we may as well explicitly annotate the UNSIGNED enums (and those which are purely enums without a sign) at the same time. That'll indicate that we've reviewed each entry, and it'll make it far more obvious one must do so when adding new entries in future. Thanks, Mark. > > Signed-off-by: Mark Brown > --- > arch/arm64/tools/sysreg | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg > index e8fb6684d7f3..16488c72827b 100644 > --- a/arch/arm64/tools/sysreg > +++ b/arch/arm64/tools/sysreg > @@ -846,12 +846,12 @@ Enum 27:24 GIC > 0b0001 IMP > 0b0010 V4P1 > EndEnum > -Enum 23:20 AdvSIMD > +SignedEnum 23:20 AdvSIMD > 0b0000 IMP > 0b0001 FP16 > 0b1111 NI > EndEnum > -Enum 19:16 FP > +SignedEnum 19:16 FP > 0b0000 IMP > 0b0001 FP16 > 0b1111 NI > > -- > 2.30.2 > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel