[PATCH 3/4] arm64: cpufeature: use cpucap naming

Mark Rutland mark.rutland at arm.com
Thu Jun 1 07:31:16 PDT 2023


On Thu, Jun 01, 2023 at 01:54:01PM +0100, Marc Zyngier wrote:
> On Thu, 01 Jun 2023 11:08:11 +0100,
> Mark Rutland <mark.rutland at arm.com> wrote:
> > 
> > To more clearly align the various users of the cpucap enumeration, this patch
> > changes the cpufeature code to use the term `cpucap` in favour of `cpu_hwap`.
> > This more clearly aligns with other users of the cpucaps, and avoids confusion
> > with the ELF hwcaps.
> > 
> > There should be no functional change as a result of this patch; this is
> > purely a renaming exercise.
> > 
> > Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> > Cc: Catalin Marinas <catalin.marinas at arm.com>
> > Cc: Marc Zyngier <maz at kernel.org>
> > Cc: Mark Brown <broonie at kernel.org>
> > Cc: Suzuki Poulose <suzuki.poulose at arm.com>
> > Cc: Will Deacon <will at kernel.org>
> > ---
> >  arch/arm64/include/asm/mmu_context.h |  2 +-
> >  arch/arm64/kernel/cpufeature.c       | 38 ++++++++++++++--------------
> >  2 files changed, 20 insertions(+), 20 deletions(-)
> > 
> > diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
> > index 56911691bef05..7f332854c961e 100644
> > --- a/arch/arm64/include/asm/mmu_context.h
> > +++ b/arch/arm64/include/asm/mmu_context.h
> > @@ -164,7 +164,7 @@ static inline void cpu_replace_ttbr1(pgd_t *pgdp, pgd_t *idmap)
> >  		 * up (i.e. cpufeature framework is not up yet) and
> >  		 * latter only when we enable CNP via cpufeature's
> >  		 * enable() callback.
> > -		 * Also we rely on the cpu_hwcap bit being set before
> > +		 * Also we rely on the system_cpucap bit being set before
> >  		 * calling the enable() function.
> >  		 */
> >  		ttbr1 |= TTBR_CNP_BIT;
> 
> nit: Shout this be moved to the first patch instead? It only differs
> by being singular instead of plural.

Yes, it should. Moved (and missing 's' added so it'll show up in a grep).

> On the other hand, I have a series that eradicates this code
> altogether, so I can't say I care deeply! ;-)

Even better! :)

Mark.



More information about the linux-arm-kernel mailing list