[PATCH V2 1/7] arm64/perf: Add register definitions for BRBE

Anshuman Khandual anshuman.khandual at arm.com
Mon Sep 12 23:24:09 PDT 2022


On 9/12/22 15:27, Mark Brown wrote:
> On Thu, Sep 08, 2022 at 10:40:40AM +0530, Anshuman Khandual wrote:
> 
>> ---
>>  arch/arm64/include/asm/sysreg.h | 222 ++++++++++++++++++++++++++++++++
>>  1 file changed, 222 insertions(+)
> 
> Rather than manually encoding register definitions in sysreg.h
> can we add them to arch/arm64/tools/sysreg so that all the
> #defines and so on are generated instead?

SYS_[BRBINF<N>|BRBSRC<N>|BRBTGT<N>]_EL1 registers are encoded as per three
distinct formulas where <CRm> and <op2> are derived from corresponding <N>
Just wondering if those could be accommodated in arch/arm64/tools/sysreg ?

System register description via arch/arm64/tools/sysreg seems bit cryptic.
BTW, do we expect all existing sysreg definitions to move there ? Because
still there are many registers and their fields present in sysreg.h

Besides, there is also some benefit in being able to grep system registers
and their fields, across headers and implementations simultaneously.



More information about the linux-arm-kernel mailing list