From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05243248BA1 for ; Wed, 15 Jan 2025 10:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736937792; cv=none; b=csQ5vt741N4xOPCZZWt+LWJ6twRWzBzkVzV3Zj1RAKH1Zz2M+noE/v3xnI1dA0rNu3AQfNbE7xgwl+W3MTgrm6zvnxHzea7WJ4RWQp/Y1G2mYjXlZO/phtQyUnqHPDRBL2qW2DLiHfEt3wGU5AK8n/+2Dz4LYQd2mQzGBJotVQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736937792; c=relaxed/simple; bh=OKWAVRmhaf3tI7/5pG8K5jZ5soGMNLBWA5gJVGgtvcs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NMqFYkMaCDHTDWPEKg9PuQDHEs6xxnvraC9WRymeIi9DZWSuXnqRopll1KTUuiLYzx/OEoGG6RUE9GIT6ePhGkni5TvsXbt9Z1A/A7NTol2VGpjN22MGOIy5eOym15VpYDsN3jt9lIT9hn9aDmSL7FIUTXp3HurdJC0drB1bd4U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=EHSrs86c; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EHSrs86c" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4362f61757fso62633955e9.2 for ; Wed, 15 Jan 2025 02:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736937789; x=1737542589; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IuwpVltn309qfmL16lWjbYMBdtIq26uOZE014kztbkU=; b=EHSrs86cG2cB+lyENYg/Hwk1zjkoP6zcccI6APlta2V5YKeJi+iQXYYm0IlxHv9IeC PUq9l32xqsEnDYWfYv/1i5LIbnf4V/dEeYGO3Y375gNuYkWwYZeD+iIfK87Fj4IFXOW2 2EmwoJZn266k4A2vLc5RtoH10tqksWxLuRRhgfybaN1VbV6e+ZbLBIjLjhzqQAEB3WYf UsiC2dDLDeIHG20cv17oRQbYKzr5E2gX5jxYg5nGfJVWW3PYh3OOgUKQrdTTROyz+m32 YD3Hh+jiAk0bDBFuFUtm2xndHSUdc5yGGCLWAWYyMe4zCi1hZZEU1ggzNQ2OiwVUGtWR OuXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736937789; x=1737542589; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IuwpVltn309qfmL16lWjbYMBdtIq26uOZE014kztbkU=; b=A371rbe9Lme48PPWvVAnwATCe57pPpdNAGZ6qIjkdEDZ9Vb4NF66trnFW0Lva2QZX9 nfKjsbotxXhTc3o6Pf/05nqTJpPIWjylA4GJO3K6UzrbDyL+jvmizPYPyPFHPOy8N2QF RuKz6tjZrxDnqfFbJTdfcXyGUM7j09gCooPjnqPxPw8uERpys3tGGYeytywEI2YTJBBm zVw/YEcPckuL3+R9xlGmWpcw0XRdgI8Dqg+lNTe/BczV50JOwsYFZwpdsprAYABBY6Dz VFEDBW5ARcxoWSj5DbqLcP+w35955noYIZmTkw/UB5RsSpwC6WxebahXOQpboc98Fsrn gOuw== X-Forwarded-Encrypted: i=1; AJvYcCVXMgKIAWAKSsJNwknu03huPkFxtWMh8LAQSCwsIoLM81GyM54/aa2ywcTTEHRder9vTZXFNRFDfipHboQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyU2S+VJSFG3oYs4XzY1zvhfHlYsKxd3zM2UKIbLn/A0P9lijKX X7J6eDzz67vMwruv0085aRdf6nn7JxpIpgTIBdCcGWScj5S2Tkg8sVfPcEx6MyU= X-Gm-Gg: ASbGncsZdJp/Ck5/GVw6dY6SCOsjBYTHAxz8SnvJKa+xURAZBiIZ9PHPu8w12Csc5YI DHKg/Z4x+mjX+beYqDikME1wBdMMsOL0T5q5e0jWRZsOB5IdWwIE/2T4Ixm+9JrsPshl6YTWP5H xYmJdiAGu9/H1IAROfr7t3hRUZkmDp75Jm3ZpQC+qym7PjcMErfVgy8Xuh3zYP1jQpRdCEBBQFP KwX0sL3Q9AFFPDHamNDYfJ1XeaRo9lkO6N3ChYgxzFc8i6SL3HDpa8mTlsq7yq8cg== X-Google-Smtp-Source: AGHT+IH3uacZBQlbJPYFrF7NDg04bYz2rstXelNvRE0i6b50wPcyzW0FqOTBm1F5gkICT1asCeDs4A== X-Received: by 2002:a05:600c:4e8c:b0:434:f5c0:3288 with SMTP id 5b1f17b1804b1-436e271d355mr261062685e9.29.1736937789135; Wed, 15 Jan 2025 02:43:09 -0800 (PST) Received: from [192.168.68.163] ([145.224.90.10]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38be2b0bf2esm3908161f8f.57.2025.01.15.02.43.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jan 2025 02:43:08 -0800 (PST) Message-ID: Date: Wed, 15 Jan 2025 10:43:07 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 04/10] arm64/sysreg: Add a comment that the sysreg file should be sorted To: Rob Herring , Marc Zyngier , Mark Brown Cc: kvmarm@lists.linux.dev, oliver.upton@linux.dev, suzuki.poulose@arm.com, coresight@lists.linaro.org, James Clark , Joey Gouly , Zenghui Yu , Catalin Marinas , Will Deacon , Mike Leach , Alexander Shishkin , Mark Rutland , Anshuman Khandual , Shiqi Liu , James Morse , Fuad Tabba , Raghavendra Rao Ananta , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20250107113252.260631-1-james.clark@linaro.org> <20250107113252.260631-5-james.clark@linaro.org> <87frloqjso.wl-maz@kernel.org> <760969b6-18b7-42ac-9524-2f1f845b3703@linaro.org> <86jzaywtea.wl-maz@kernel.org> Content-Language: en-US From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 14/01/2025 6:16 pm, Rob Herring wrote: > On Mon, Jan 13, 2025 at 10:49 AM Marc Zyngier wrote: >> >> On Mon, 13 Jan 2025 15:43:39 +0000, >> James Clark wrote: >>> >>> >>> >>> On 12/01/2025 12:49 pm, Marc Zyngier wrote: >>>> On Tue, 07 Jan 2025 11:32:41 +0000, >>>> James Clark wrote: >>>>> >>>>> From: James Clark >>>>> >>>>> There are a few entries particularly at the end of the file that aren't >>>>> in order. To avoid confusion, add a comment that might help new entries >>>>> to be added in the right place. >>>>> >>>>> Reviewed-by: Mark Brown >>>>> Signed-off-by: James Clark >>>>> Signed-off-by: James Clark >>>>> --- >>>>> arch/arm64/tools/sysreg | 2 ++ >>>>> 1 file changed, 2 insertions(+) >>>>> >>>>> diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg >>>>> index b081b54d6d22..4ba167089e2a 100644 >>>>> --- a/arch/arm64/tools/sysreg >>>>> +++ b/arch/arm64/tools/sysreg >>>>> @@ -48,6 +48,8 @@ >>>>> # feature that introduces them (eg, FEAT_LS64_ACCDATA introduces enumeration >>>>> # item ACCDATA) though it may be more taseful to do something else. >>>>> +# Please try to keep entries in this file sorted by sysreg >>>>> encoding. >>>>> + >>>>> Sysreg OSDTRRX_EL1 2 0 0 0 2 >>>>> Res0 63:32 >>>>> Field 31:0 DTRRX >>>> >>>> "Do as I say, don't do as I do". >>>> >>>> I don't think this makes any sense if we don't actually sort the file >>>> the first place. >>>> >>>> M. >>>> >>> >>> I think it's ok if it avoids review comments that new entries should >>> be sorted. Or maybe we do the opposite and the comment should say this >>> file is allowed to be unsorted... >> >> The better option would be to add the comment *and* sort the file. >> Leading by example has some value, it seems. > > IME, it's better if documentation just states what the tools enforce. > > Can't we add something like this to the header generation: > > $ grep '^Sysreg\s' arch/arm64/tools/sysreg | sort -n -k3 -k4 -k5 -k6 -k7 -c > sort: -:22: disorder: Sysreg ID_MMFR4_EL1 3 0 0 > 2 6 > > Rob Actually I updated gen-sysreg.awk to fail the build if it's not sorted, was just about to post it. I don't know if a build failure or a warning is preferred but I can do either. James