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 9358DC4332F for ; Fri, 9 Dec 2022 13:34:56 +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-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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A71c3PdjK+Siy52zagRPziSLuIE/NYUPnzd3YhxOldg=; b=sv/naPj/QstZRJQyBc7cKBDnx1 M8Tv+1ok+lIU1yagKjySDRjgWzya5fl6laqy5kyQkAze4GHYyMKiTDAXsntepGLwbt5L5fohxp/8I 3tEzNpvTZmsDLGW1iwNEi18ZolLeWdYYvPnk+Sk/Qaaf5jaq/mDE2Labt9sY0FpZ2yKu3DLyjw1aN XxMc1XzSRIuu7dsj0hvp8TlZbi1RschZMWiDqXn8XQtZNRGihTIBpqQ5DKksnsNABeXmkbrrwCDw4 UlFC3ew9QVHsqbtSJraOJyGocf4pbcRr2LZL/JiTJkVDZWQL3PDLSKINnUNHhB6kRclq0iM2hnqQV CE9whzaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3dVm-007wx2-Pf; Fri, 09 Dec 2022 13:33:58 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3dVj-007wwE-UI for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 13:33:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0745D62254; Fri, 9 Dec 2022 13:33:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05279C433EF; Fri, 9 Dec 2022 13:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670592834; bh=gyWR4RAfAzbBPnXssinQ3fvzn6agrTVfC7eKSV53FNA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lq1n9daBps6u4WgtC3QifKX+l1op3YKsrwekrgWYGWp0LnFz2qpm/QiIm8QVZfbak LBNykbzwldi+y00tun7UgbDXy/JjEmykZoAwQd0q/8wCFRuhvDgXfp0EQd6YoEkyVr DXHjKjSPwmkHvGZuv7FuAQN+/d43oVLmFCFwKUFey687ex9zsSKseHhMIetgj6YOgc UvilSiU4IDzbcsVYF0jjyTj6+7Wpq0U3ip6koma7xEyiA31IR3oxcH0H2KAYtrl7Ru I04V0dHTDCLK0eEpLEpuFHhWsljobjczDfJgAm9aV0Xc1uD+kTV+VzSZyiS8BQ0TH2 qJQL4AMmLhvrg== Date: Fri, 9 Dec 2022 13:33:49 +0000 From: Mark Brown To: Mark Rutland 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 In-Reply-To: X-Cookie: Who is John Galt? X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_053356_067422_BEB80C1C X-CRM114-Status: GOOD ( 23.00 ) 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: multipart/mixed; boundary="===============4414637227217880194==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4414637227217880194== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ya8j9Zfx5ZB8A0gb" Content-Disposition: inline --ya8j9Zfx5ZB8A0gb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 09, 2022 at 12:42:10PM +0000, Mark Rutland wrote: > 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. I am not sure I will get round to doing all that at once in a reasonable timeframe on what is basically a low priority background task. I'd much rather just leave the use of FTR_SIGNED/UNSIGNED in the C code, I only did this because I initially did that conversion and the repetitiveness was jumping out as obvious. > 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. We could also just leave Enum as unspecified, do all the UnsignedEnums, and leave enum as unspecified and not generating a sign constant, that any users that care about the sign of an enum won't get an incorrect default. --ya8j9Zfx5ZB8A0gb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOTOTwACgkQJNaLcl1U h9Af6Af/Ss5s70W/S+uEalbmAr0JejyUu8mlXrQA2nKUiw2UFQrmQe98/MWhkv1o 60O97zKxp9LEjQlFybamKVGNZ3ZuZuVHq8ay6on0u6f8W/WYOo947V5q5Oykamkq j9seiAFCJWAlCUk04uE8iDTOVBS2hyHnrWH2XHdCeMlGgiZYCYEUYrWPsqRtEhYw tSs362xTSw429FNR5lRg0X5mFvxCadswuhoz+Vp4pr6icb7E7gtHeghiA/7elHKr 7XVHSjHxSfqf5t0gtCxbEPhayd7isNmUXx6YjR6ghIt202Z9Of59hBytDWN+SP80 kBHx/adBBYxdFXteghGjmHzgEyjW+Q== =tG00 -----END PGP SIGNATURE----- --ya8j9Zfx5ZB8A0gb-- --===============4414637227217880194== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4414637227217880194==--