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 A400ECA0EDC for ; Thu, 14 Aug 2025 09:46:31 +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=HJ6Pimmlqrmc12K6fYTTFBnxcThGEWvn5LfP5y4/258=; b=bV3H8q5FhJQOllJNqa+E/+QkYN pGD8vqJR0ouV7xAfWtBRqYET+UcgaEx4K2FOlJNFg6HkoHn8ppTXypJ97wZjnshdQm+M63BML9AkN V5N6V/BtqnNlH9YoGbjVfc7v+pNbVK2uOR1+tFzA49c7uw2qJyKGXBDWGdi/q8XWpdKfZqJjLLQGt DJF/I0/WOpZd3Oya12zOK/ZS/8baxik3WMGschxs8w3tr5uo4MAzykmmlyGM6DcG5GqGYVDbFoHLn ko9t1S1YfNOKiJfaoX3JlqA5+4gB/t9mAnM2652DxsamK2kMQcZOYl7ZFdiqRjYRPCHNbN/vUKpGp mPI5E9RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1umUXU-0000000GTUZ-0ATF; Thu, 14 Aug 2025 09:46:28 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1umSC1-0000000G3ey-45UT for linux-arm-kernel@lists.infradead.org; Thu, 14 Aug 2025 07:16:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 63DBE40BE9; Thu, 14 Aug 2025 07:16:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40F86C4CEEF; Thu, 14 Aug 2025 07:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755155769; bh=ECvrWWwHAWd6mW83/kXEp1zhLwqr2pHT8QKOF/ZxN/0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RIqlVBCl9FRxKUrECo6Bzbhv/UCKPhU4yHX1/q/XQgYJJEwLMhlBgfp0rDxfCq+Ne +vtLthSUz7NOZRfDSg9g7RRddOrNhCXuB8NkueymMNpz+rxfBv8xiri6uGcexADgeh 7io1d6siEdjZxONCFjjOe8B52SKEE4BvU21JVsp1ZqVhH36Ee/bLzhwMGrJHheCylK AECN6pIYrel9es//WjhayG7C/CRm+EH2PVDK0T6bR8XKZCc646H9rOS68/oNFnPwTO lDuanfnx9jT1T9vAaJYYsh8wQFqi5jLsABxov8jz3hkfpxb3G/KKarw3xQ7L/h20et Uen+FAW/ZP8Lg== 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 1umSBw-007Kl2-2u; Thu, 14 Aug 2025 08:16:04 +0100 Date: Thu, 14 Aug 2025 08:16:03 +0100 Message-ID: <86ecte8jbg.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, will@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, vdonnefort@google.com, qperret@google.com, sebastianene@google.com, keirf@google.com, smostafa@google.com Subject: Re: [PATCH v2 2/2] arm64: sysreg: Add validation checks to sysreg header generation script In-Reply-To: <20250813164506.1203851-3-tabba@google.com> References: <20250813164506.1203851-1-tabba@google.com> <20250813164506.1203851-3-tabba@google.com> 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/30.1 (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: tabba@google.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, will@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, vdonnefort@google.com, qperret@google.com, sebastianene@google.com, keirf@google.com, smostafa@google.com 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-20250814_001610_035392_D237BFA5 X-CRM114-Status: GOOD ( 15.44 ) 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 Wed, 13 Aug 2025 17:45:06 +0100, Fuad Tabba wrote: > > The gen_sysreg.awk script processes the system register specification in > the sysreg text file to generate C macro definitions. The current script > will silently accept certain errors in the specification file, leading > to incorrect header generation. > > For example, a Sysreg or SysregFields can be accidentally duplicated, > causing its macros to be emitted twice. Or an Enum can contain duplicate > values for different items, which is architecturally incorrect. > > Add checks to catch these errors at build time. The script now tracks > all seen Sysreg and SysregFields definitions and checks for duplicates. > It also tracks values within each Enum block to ensure entries are > unique. > > Signed-off-by: Fuad Tabba Thanks for adding these checks, most useful. Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.