On Mon, Nov 10, 2025 at 11:44:20AM +0000, Suzuki Kuruppassery Poulose wrote:
[...]
- etm4_cs_lock(drvdata, csa);
- etm4_disable_hw(drvdata);
- etm4_cs_unlock(drvdata, csa);
This looks a bit hacky. Here are the options :
- Leave it as above, but clearly explain in a comment why we do this.
- The other option is to restructure etm4_disable_hw into
etm4_cs_unlock() __etm4_disable_hw() etm4_cs_lock()
I will try the option 2.
And use __etm4_disable_hw() from here.
/* wait for TRCSTATR.IDLE to go up */ if (etm4x_wait_status(csa, TRCSTATR_IDLE_BIT, 1)) { dev_err(etm_dev, @@ -1972,14 +1889,6 @@ static int __etm4_cpu_save(struct etmv4_drvdata *drvdata) goto out;
This goto can be removed too.
Indeed, will remove it.
Thanks, Leo