mbox series

[0/4] arm64: cpucap cleanup

Message ID 20230601100812.2303944-1-mark.rutland@arm.com (mailing list archive)
Headers show
Series arm64: cpucap cleanup | expand

Message

Mark Rutland June 1, 2023, 10:08 a.m. UTC
Currently arm64 uses inconsistent terminology when handling cpucaps,
with different places in the code referring to these as "capabilities",
"features", "cpufeatures", "hwcaps", and "cpu_hwcaps" with the latter
two easily being confused with the ELF hwcaps.

Similarly, the bitmaps used to store the boot and system cpucaps are
named "boot_capabilities" and "cpu_hwcaps" respectively.

All of this is unnecessarily confusing.

This series tries to apply a consistent "cpucap" naming scheme,
following the example of "asm/cpucaps.h" where the cpucap values are
defined. This clearly separates these from the ELF hwcaps, and makes it
easier to understand the code.

I've split this out from a larger rework of the cpucap logic, as that
larger rework isn't yet ready and I think this stands on its own as a
nice cleanup.

There should be no functional change as a result of this series.

Thanks,
Mark.

Mark Rutland (4):
  arm64: standardise cpucap bitmap names
  arm64: alternatives: use cpucap naming
  arm64: cpufeature: use cpucap naming
  arm64: cpufeature: fold cpus_set_cap() into update_cpu_capabilities()

 arch/arm64/include/asm/alternative-macros.h | 54 ++++++++++-----------
 arch/arm64/include/asm/alternative.h        |  4 +-
 arch/arm64/include/asm/cpufeature.h         | 24 +++------
 arch/arm64/include/asm/irqflags.h           |  2 +-
 arch/arm64/include/asm/lse.h                |  2 +-
 arch/arm64/include/asm/mmu_context.h        |  2 +-
 arch/arm64/kernel/alternative.c             | 23 +++++----
 arch/arm64/kernel/cpufeature.c              | 53 ++++++++++----------
 8 files changed, 77 insertions(+), 87 deletions(-)

Comments

Suzuki K Poulose June 1, 2023, 2:07 p.m. UTC | #1
On 01/06/2023 11:08, Mark Rutland wrote:
> Currently arm64 uses inconsistent terminology when handling cpucaps,
> with different places in the code referring to these as "capabilities",
> "features", "cpufeatures", "hwcaps", and "cpu_hwcaps" with the latter
> two easily being confused with the ELF hwcaps.
> 
> Similarly, the bitmaps used to store the boot and system cpucaps are
> named "boot_capabilities" and "cpu_hwcaps" respectively.
> 
> All of this is unnecessarily confusing.
> 
> This series tries to apply a consistent "cpucap" naming scheme,
> following the example of "asm/cpucaps.h" where the cpucap values are
> defined. This clearly separates these from the ELF hwcaps, and makes it
> easier to understand the code.
> 
> I've split this out from a larger rework of the cpucap logic, as that
> larger rework isn't yet ready and I think this stands on its own as a
> nice cleanup.
> 
> There should be no functional change as a result of this series.
> 
> Thanks,
> Mark.
> 
> Mark Rutland (4):
>    arm64: standardise cpucap bitmap names
>    arm64: alternatives: use cpucap naming
>    arm64: cpufeature: use cpucap naming
>    arm64: cpufeature: fold cpus_set_cap() into update_cpu_capabilities()
> 
>   arch/arm64/include/asm/alternative-macros.h | 54 ++++++++++-----------
>   arch/arm64/include/asm/alternative.h        |  4 +-
>   arch/arm64/include/asm/cpufeature.h         | 24 +++------
>   arch/arm64/include/asm/irqflags.h           |  2 +-
>   arch/arm64/include/asm/lse.h                |  2 +-
>   arch/arm64/include/asm/mmu_context.h        |  2 +-
>   arch/arm64/kernel/alternative.c             | 23 +++++----
>   arch/arm64/kernel/cpufeature.c              | 53 ++++++++++----------
>   8 files changed, 77 insertions(+), 87 deletions(-)
> 


For the series,

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Mark Rutland June 1, 2023, 2:33 p.m. UTC | #2
On Thu, Jun 01, 2023 at 03:07:03PM +0100, Suzuki K Poulose wrote:
> For the series,
> 
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Thanks!

Mark.