Re: [PATCH] arm64: cpufeature: Display the set of cores with a feature

From: Will Deacon
Date: Fri Oct 13 2023 - 04:29:57 EST


On Thu, Oct 12, 2023 at 08:30:16PM -0500, Jeremy Linton wrote:
> The AMU feature can be enabled on a subset of the cores in a system.
> Because of that, it prints a message for each core as it is detected.
> This becomes tedious when there are hundreds of cores. Instead, for
> CPU features which can be enabled on a subset of the present cores,
> lets wait until update_cpu_capabilities() and print the subset of cores
> the feature was enabled on.
>
> Signed-off-by: Jeremy Linton <jeremy.linton@xxxxxxx>
> ---
> arch/arm64/include/asm/cpufeature.h | 2 ++
> arch/arm64/kernel/cpufeature.c | 16 +++++++++++++---
> 2 files changed, 15 insertions(+), 3 deletions(-)

That's pretty neat. Are there any other caps we could switch over to this
new mechanism as well? We have a weird bodge, for example, in has_hw_dbm()
to print a "detected: ..." message and I wonder whether following the
example of the AMU would be better?

Will