Subject: Re: [PATCH v6 08/13] coresight: etm4x: remove redundant call etm4_enable_hw() with hotplug

From: Leo Yan <[email-masked]>
Date: Fri, 15 May 2026 10:08:50 +0100

On Wed, Apr 22, 2026 at 02:21:58PM +0100, Yeoreum Yun wrote:

[...]

> +	/*
> +	 * Take the hotplug lock to prevent redundant calls to etm4_enable_hw().
> +	 *
> +	 * The cpu_online_mask is set at the CPUHP_BRINGUP_CPU step.
> +	 * In other words, if etm4_enable_sysfs() is called between
> +	 * CPUHP_BRINGUP_CPU and CPUHP_AP_ARM_CORESIGHT_STARTING,
> +	 * etm4_enable_hw() may be invoked in etm4_enable_sysfs_smp_call()
> +	 * and then executed again in etm4_starting_cpu().
> +	 */
> +	cpus_read_lock();
>  	ret = smp_call_function_single(drvdata->cpu,
>  				       etm4_enable_sysfs_smp_call, &arg, 1);
> +	cpus_read_unlock();

This will cause double deadlock with the patch:
https://lore.kernel.org/linux-arm-kernel/20260511-ar[email-masked]/#t

I think we need to drop this one.

Thanks,
Leo