Re: [PATCH v2] coresight: etm4x: Fix crash observed on Qcom ETM parts with 'Low power override'
From: Leo Yan <hidden>
Date: 2022-09-14 15:00:50
Also in:
lkml
On Wed, Sep 14, 2022 at 03:43:53PM +0100, Suzuki Kuruppassery Poulose wrote: [...]
quoted
quoted
+ /* + * Some Qualcomm implementations require skipping powering up the trace unit, + * as the ETMs are in the same power domain as their CPU cores. + * + * Since the 'skip_power_up' flag is used inside 'etm4_init_arch_data' function, + * initialize it before the function is called. + */ + if (fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up")) + drvdata->skip_power_up = true; +I personally think this sentence should be placed in the function etm4_probe(), you need to move it just before smp call etm4_init_arch_data(), this can allow DT property "qcom,skip-power-up" to be respected.Or we could move this to init_iomem_access() and explicitly set the flag to true in init_sysreg_access().
Agreed, this is more clear. [...]
quoted
A side topic, in the mainline kernel I found the value "desc.access.io_mem" is always zero (see the initialized value in etm4_probe() and etm4_init_sysreg_access()). Should we initialize desc.access.io_mem to true in etm4_probe()?Thats not true. It is initialised at : etm4_init_iomem_access(): *csa = CSDEV_ACCESS_IOMEM(drvdata->base); Where #define CSDEV_ACCESS_IOMEM(_addr) \ ((struct csdev_access) { \ .io_mem = true, \ .base = (_addr), \ })
Thanks a lot for explaination, sorry for noise. Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel