public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/6] arm64/cpufeature: Make use of sysreg helpers for hwcaps
@ 2022-12-08 16:03 Mark Brown
  2022-12-08 16:03 ` [PATCH 1/6] arm64/cpufeature: Fix field sign for DIT hwcap detection Mark Brown
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Mark Brown @ 2022-12-08 16:03 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Suzuki K Poulose, James Morse, linux-arm-kernel, Mark Brown

Now that all the ID registers we use have been converted to automatic
register generation we can start to make use of the regular definitions
we have for the registers and their bitfields to make the hwcap tables
easier to write and review.  This series does that, updating the macros
used to generate the hwcaps to provide what should be clearer and less
error prone specifications for the hwcaps.  We move from specifying like
this:

      HWCAP_CAP(SYS_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_BT_SHIFT, 4, FTR_UNSIGNED, ID_AA64PFR1_EL1_BT_IMP, CAP_HWCAP, KERNEL_HWCAP_BTI),

to this:

      HWCAP_CAP(ID_AA64PFR1_EL1, BT, IMP, CAP_HWCAP, KERNEL_HWCAP_BTI),

which is shorter due to having less duplicate information and makes it
much harder to make an error like specifying the wrong field width or
an invalid enumeration value since everything must be a constant defined
for the sysreg and names are only typed once.

I'm posting it now in the hope of getting some review before v6.2-rc1
comes around, changing this will cause dependency issues for any series
adding new features so if we're going to do it it's probably helpful to
get it merged relatively early.

While doing this I found some errors which I have previously posted,
I've rolled those fixes into this series for simplicity.

To: Catalin Marinas <catalin.marinas@arm.com>
To: Will Deacon <will@kernel.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>

---
Mark Brown (6):
      arm64/cpufeature: Fix field sign for DIT hwcap detection
      arm64/sysreg: Fix errors in 32 bit enumeration values
      arm64/sysreg: Allow enumerations to be declared as signed
      arm64/sysreg: Annotate signed enumerations
      arm64/cpufeature: Always use symbolic name for feature value in hwcaps
      arm64/cpufeature: Use helper macros to specify hwcaps

 arch/arm64/kernel/cpufeature.c  | 181 +++++++++++++++++++---------------------
 arch/arm64/tools/gen-sysreg.awk |  18 ++++
 arch/arm64/tools/sysreg         |  12 +--
 3 files changed, 111 insertions(+), 100 deletions(-)
---
base-commit: 5f4c374760b031f06c69c2fdad1b0e981a1ad42f
change-id: 20221207-arm64-sysreg-helpers-6734642b7fb9

Best regards,
-- 
Mark Brown <broonie@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-12-09 16:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08 16:03 [PATCH 0/6] arm64/cpufeature: Make use of sysreg helpers for hwcaps Mark Brown
2022-12-08 16:03 ` [PATCH 1/6] arm64/cpufeature: Fix field sign for DIT hwcap detection Mark Brown
2022-12-09 12:25   ` Mark Rutland
2022-12-09 13:49     ` Mark Brown
2022-12-08 16:03 ` [PATCH 2/6] arm64/sysreg: Fix errors in 32 bit enumeration values Mark Brown
2022-12-09 12:29   ` Mark Rutland
2022-12-08 16:03 ` [PATCH 3/6] arm64/sysreg: Allow enumerations to be declared as signed Mark Brown
2022-12-09 12:34   ` Mark Rutland
2022-12-09 13:55     ` Mark Brown
2022-12-08 16:03 ` [PATCH 4/6] arm64/sysreg: Annotate signed enumerations Mark Brown
2022-12-09 12:42   ` Mark Rutland
2022-12-09 13:33     ` Mark Brown
2022-12-09 16:03       ` Mark Rutland
2022-12-08 16:03 ` [PATCH 5/6] arm64/cpufeature: Always use symbolic name for feature value in hwcaps Mark Brown
2022-12-09 12:48   ` Mark Rutland
2022-12-08 16:03 ` [PATCH 6/6] arm64/cpufeature: Use helper macros to specify hwcaps Mark Brown
2022-12-09 12:51   ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox