Hi Mike,
On 2020-07-24 16:35, Mike Leach wrote:
Hi Sai,
On Fri, 24 Jul 2020 at 08:48, Sai Prakash Ranjan saiprakash.ranjan@codeaurora.org wrote:
Hi Mike,
Since commit 9b6a3f3633a5cc9("coresight: etmv4: Fix CPU power management setup in probe() function"), ETM probe fails consistently like below:
localhost ~ # dmesg | grep -i etm [ 6.460602] coresight-etm4x: probe of 7040000.etm failed with error -16 [ 6.524756] coresight etm1: CPU1: ETM v4.2 initialized [ 6.531152] coresight etm2: CPU2: ETM v4.2 initialized [ 6.538495] coresight etm3: CPU3: ETM v4.2 initialized [ 6.545124] coresight etm4: CPU4: ETM v4.2 initialized [ 6.552904] coresight etm5: CPU5: ETM v4.2 initialized [ 6.559714] coresight etm6: CPU6: ETM v4.2 initialized [ 6.569596] coresight etm7: CPU7: ETM v4.2 initialized localhost ~ #
Most of the time its for ETM0 but I occasionally see ETM1 and other ETMs failing to probe, but the some ETM probe failure is always there. I'm using SC7180 based platform on 5.4 kernel which has all the coresight patches backported.
If I revert that commit, I don't see the issue at all. In case you can identify something which might be causing this, please let me know. I'm planning to look into this as well in the meantime.
I'm not seeing any issues - using DB410 + 5.8 kernel.
The patch is a clean-up & fixes an issue that the goto skipped an unlock on error, rather than any functional change.
Yes, I tested on another platform which is based on SDM845 and there the issue is not seen.
The only differences I can see are:-
- the cpu_pm_register_notifier() call is earlier in the sequence.
Shouldn't make a difference as cpu_pm and hotplug are different systems. 2) the error from cpuhp_setup_state_nocalls_cpuslocked() is no longer ignored.
I would suggest that 2) may be the issue on your system - if you are now seeing an error that was not being processed before?
Yes the error is from cpuhp_setup_state_nocalls_cpuslocked(),
[ 6.413532] etm4_pm_setup_cpuslocked: etm4_online_cpu ret=181 [ 6.420401] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7040000.etm [ 6.446244] etm4_pm_setup_cpuslocked: etm4_online_cpu ret=181 [ 6.461772] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7140000.etm [ 6.474249] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7040000.etm [ 6.482801] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7240000.etm [ 6.524947] etm4_pm_setup_cpuslocked: etm4_online_cpu ret=181 [ 6.535943] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7140000.etm [ 6.536308] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7040000.etm [ 6.541993] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7340000.etm [ 6.542087] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7240000.etm [ 6.542724] etm4_pm_setup_cpuslocked: etm4_starting_cpu ret=-16 <--- [ 6.643953] etm4_probe: etm4_pm_setup_cpuslocked ret=-16 dev=7440000.etm <--- [ 6.656030] etm4_pm_setup_cpuslocked: etm4_online_cpu ret=181 [ 6.662426] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7540000.etm [ 6.666221] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7140000.etm [ 6.682263] etm4_pm_setup_cpuslocked: etm4_starting_cpu ret=-16 <--- [ 6.691385] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7040000.etm [ 6.699443] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7340000.etm [ 6.699991] etm4_probe: etm4_pm_setup_cpuslocked ret=-16 dev=7640000.etm <--- [ 6.722837] etm4_pm_setup_cpuslocked: etm4_online_cpu ret=181 [ 6.737515] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7740000.etm [ 6.774354] etm4_pm_setup_cpuslocked: etm4_online_cpu ret=181 [ 6.781174] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7240000.etm [ 6.804638] etm4_pm_setup_cpuslocked: etm4_online_cpu ret=181 [ 6.811482] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7540000.etm [ 6.825762] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7140000.etm [ 6.839725] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7040000.etm [ 6.853700] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7340000.etm [ 6.867612] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7740000.etm [ 6.882355] etm4_probe: etm4_pm_setup_cpuslocked ret=0 dev=7240000.etm
Thanks, Sai