[PATCH 08/19] arm64: smp: Don't bother printing the I-cache policy for each CPU

Jinjie Ruan ruanjinjie at huawei.com
Tue Sep 8 01:33:18 PDT 2026



在 2026/9/8 0:40, Will Deacon 写道:
> The I-cache policy isn't particularly interesting but printing it early
> can result in unnecessary serialisation of onlining CPUs.
> 
> Remove the pointless print.
> 
> Signed-off-by: Will Deacon <will at kernel.org>
> ---
>  arch/arm64/kernel/cpuinfo.c | 16 ----------------
>  1 file changed, 16 deletions(-)
> 
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index b423301a13cc..6dbea3a8bb23 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -31,19 +31,6 @@
>   * values depending on configuration at or after reset.
>   */
>  DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data);
> -
> -static inline const char *icache_policy_str(int l1ip)
> -{
> -	switch (l1ip) {
> -	case CTR_EL0_L1Ip_VIPT:
> -		return "VIPT";
> -	case CTR_EL0_L1Ip_PIPT:
> -		return "PIPT";
> -	default:
> -		return "RESERVED/UNKNOWN";
> -	}
> -}
> -
>  unsigned long __icache_flags;
>  
>  static const char *const hwcap_str[] = {
> @@ -424,7 +411,6 @@ device_initcall(cpuinfo_regs_init);
>  
>  static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
>  {
> -	unsigned int cpu = smp_processor_id();
>  	u32 l1ip = CTR_L1IP(info->reg_ctr);
>  
>  	switch (l1ip) {
> @@ -436,8 +422,6 @@ static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
>  		set_bit(ICACHEF_ALIASING, &__icache_flags);
>  		break;
>  	}
> -
> -	pr_info("Detected %s I-cache on CPU%d\n", icache_policy_str(l1ip), cpu);

As we need to defer RCU registration during secondary CPU bringup, so we
should avoid unnecessary early print during secondary CPU bringup, which
will trigger a false-positive lockdep"suspicious RCU usage" splat during
early lock acquisitions as commit ce3d31ad3cac ("arm64/smp: Move
rcu_cpu_starting() earlier") pointed out.

LGTM
Reviewed-by: Jinjie Ruan <ruanjinjie at huawei.com>

>  }
>  
>  static void __cpuinfo_store_cpu_32bit(struct cpuinfo_32bit *info)




More information about the linux-arm-kernel mailing list