[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c1e159b7-c884-e498-6b01-64a897117036@arm.com>
Date: Wed, 21 Feb 2024 10:10:18 +0000
From: James Clark <james.clark@....com>
To: Mark Brown <broonie@...nel.org>
Cc: coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.linux.dev, maz@...nel.org, suzuki.poulose@....com,
acme@...nel.org, oliver.upton@...ux.dev, James Morse <james.morse@....com>,
Zenghui Yu <yuzenghui@...wei.com>, Catalin Marinas
<catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Mike Leach <mike.leach@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Anshuman Khandual <anshuman.khandual@....com>,
Miguel Luis <miguel.luis@...cle.com>, Joey Gouly <joey.gouly@....com>,
Ard Biesheuvel <ardb@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>, Mark Rutland <mark.rutland@....com>,
Kalesh Singh <kaleshsingh@...gle.com>,
Vincent Donnefort <vdonnefort@...gle.com>,
Ryan Roberts <ryan.roberts@....com>, Fuad Tabba <tabba@...gle.com>,
Jing Zhang <jingzhangos@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/7] arm64/sysreg/tools: Move TRFCR definitions to
sysreg
On 20/02/2024 16:11, Mark Brown wrote:
> On Tue, Feb 20, 2024 at 10:09:13AM +0000, James Clark wrote:
>> Add separate definitions for ELx and EL2 as TRFCR_EL1 doesn't have CX.
>> This also mirrors the previous definition so no code change is required.
>
> This is also converting to automatic generation in the process.
>
>> +SysregFields TRFCR_EL2
>> +Res0 63:7
>> +UnsignedEnum 6:5 TS
>> + 0b0000 USE_TRFCR_EL1_TS
>> + 0b0001 VIRTUAL
>> + 0b0010 GUEST_PHYSICAL
>> + 0b0011 PHYSICAL
>> +EndEnum
>> +Res0 4
>> +Field 3 CX
>> +Res0 2
>> +Field 1 E2TRE
>> +Field 0 E0HTRE
>> +EndSysregFields
>
> This has exactly one user and I'd not expect more so why have a separate
> SysregFields?
>
No reason, probably just a copy paste thing. I'll change it to a Sysreg.
>> +# TRFCR_EL1 doesn't have the CX bit so redefine it without CX instead of
>> +# using a shared definition between TRFCR_EL2 and TRFCR_EL1
>
> This comment is reflecting the default state?
>
True, will remove.
>> +Sysreg TRFCR_EL1 3 0 1 2 1
>> +Fields TRFCR_ELx
>> +EndSysreg
>> +
>> +Sysreg TRFCR_EL2 3 4 1 2 1
>> +Fields TRFCR_EL2
>> +EndSysreg
>> +
>> +Sysreg TRFCR_EL12 3 5 1 2 1
>> +Fields TRFCR_ELx
>> +EndSysreg
>
> These are generally sorted by encoding (simiarly to how sysreg.h was
> sorted historically).
Ah I didn't know that. Can I add a comment to the top of the file saying
that it should be kept sorted?
Powered by blists - more mailing lists