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 5BFCDCD4851 for ; Tue, 19 May 2026 10:23:10 +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=7H68l4OcBjtpjeaF6z5PFn99IQuPZnYdgMG4q7QTLc4=; b=DbqRIPe7iYh7cMUjAoeYFWVbgq d0pe+GZyG1uWQl6nlOATSb8/C2bmwIRZM6cP5mP6E/kiMux1N2ZnY8pyGoH3b3KwSqaZvWDpx/WQP 5h7JxX65X1wpcUtd0tHpFSWwI7RqdMTTksxUoqHhKM6Evrjmsitmu2c9ZtFp97bXiq2aYgtLSozZ9 aRHfZvZ5D1qM7nOhEAO0IfVZf5nsYo9tAfogGqPAY35ZT45i2d1t97mXkALWErsiqRXNu6afmVB7J nOeI3OVvGDtLU2geUIo1xW3VaSOF89tF4R7sf50J93x0PmJaEhDigZfoKoeHwALSQFGeIwByKmycF pBKKsf2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wPHbL-000000014YO-07dR; Tue, 19 May 2026 10:23:03 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wPHbJ-000000014Xx-3yOH for linux-arm-kernel@lists.infradead.org; Tue, 19 May 2026 10:23:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id F2DA660219; Tue, 19 May 2026 10:23:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A94DAC2BCB3; Tue, 19 May 2026 10:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779186180; bh=dJqprahTyxpYNUn6AwqHfPXuovfDD8ZbTCYM1ACl1RM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Q/fBj+NlM1QXg6cYP9E/cUcU9PkApK4IBpvWBL/OWD6zlG1VjGo+sQynkZ66uGKh7 y02lUQCdhSnZ4ccWZDGP523e3xOIAuITQxam3+OLLJX1k5uHMcJ27mkSbFAzz3UyVY eYrFk1RJ+It7ZBvQNkQkxOibpGAX6i3WfNvnEf2zUIWYy8eg/F9ajF/40H680urVgx +g2qBmMSw/N+Pkl6qeJeEpydZIJZCkbW+0urapOFoHtFZJ1orJcSRyNcrUgU5PXVAU t1mO+ju4NkfIENmzyN+TjgtoXQGlpfgnkz+f+hw5jQDpp9oqODZcDLmj6bXqFRU10c opn7BpsWT9y7A== 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.98.2) (envelope-from ) id 1wPHbG-00000003tLL-1SCO; Tue, 19 May 2026 10:22:58 +0000 Date: Tue, 19 May 2026 11:22:57 +0100 Message-ID: <86se7nwvem.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Mark Rutland Subject: Re: [PATCH] arm64: cpucaps: Keep entries sorted In-Reply-To: <20260519092243.7278-1-will@kernel.org> References: <20260519092243.7278-1-will@kernel.org> 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: will@kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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 Tue, 19 May 2026 10:22:42 +0100, Will Deacon wrote: > > The cpucaps list is supposed to be sorted, even though the awk script > which processes it doesn't really care. Since this isn't enforced or > relied upon and because the alphabet is hard, the list has gradually > developed an ordering of its own. > > Re-sort the file. > > Cc: Catalin Marinas > Cc: Mark Rutland > Reported-by: Marc Zyngier > Signed-off-by: Will Deacon > --- > > Marc pointed out that HAS_BBML2_NOABORT was in the wrong place but, on > closer inspection, there are a bunch of misplaced entries here. I > honestly don't like the churn of re-sorting it, so an alternative is > to live with it and remove the comment at the top asking people to keep > it sorted it. Any preferences? I'm not sold on the requirement for keeping this sorted, TBH. The commit message says "to minimise conflicts", which I can understand as it avoids people adding entries at the end all the time, but it is obvious that we (especially myself) can't manage to do that. If we want to keep this sorted for $reasons, let's actively enforce it in the generation script: diff --git a/arch/arm64/tools/gen-cpucaps.awk b/arch/arm64/tools/gen-cpucaps.awk index 2f4f61a0af17e..2e06768ff432e 100755 --- a/arch/arm64/tools/gen-cpucaps.awk +++ b/arch/arm64/tools/gen-cpucaps.awk @@ -20,10 +20,14 @@ BEGIN { print "" print "/* Generated file - do not edit */" cap_num = 0 + previous = "" print "" } /^[vA-Z0-9_]+$/ { + if (cap_num > 0 && previous > $0) + fatal("unsorted cap " $0) + previous = $0 printf("#define ARM64_%-40s\t%d\n", $0, cap_num++) next } although that results in a different sorting order (my awk-foo is limited). Thanks, M. -- Without deviation from the norm, progress is not possible.