mbox series

[v1,0/5] coresight: etm4x: save/restore ETMv4 context across CPU low power states

Message ID 20190618125433.9739-1-andrew.murray@arm.com (mailing list archive)
Headers show
Series coresight: etm4x: save/restore ETMv4 context across CPU low power states | expand

Message

Andrew Murray June 18, 2019, 12:54 p.m. UTC
Some hardware will ignore bit TRCPDCR.PU which is used to signal
to hardware that power should not be removed from the trace unit.
Let's mitigate against this by saving and restoring the trace
unit state when the CPU enters low power states.

To provide a benefit to both self-hosted and external debuggers
we save/restore the entire state which includes etmv4_config data
and dynamic data such as inflight counter values, sequencer
states, etc.


Andrew Murray (5):
  coresight: etm4x: remove superfluous setting of os_unlock
  coresight: etm4x: use explicit barriers on enable/disable
  coresight: etm4x: use octal permissions for module_params
  coresight: etm4x: improve clarity of etm4_os_unlock comment
  coresight: etm4x: save/restore state across CPU low power states

 drivers/hwtracing/coresight/coresight-etm4x.c | 260 +++++++++++++++++-
 drivers/hwtracing/coresight/coresight-etm4x.h |  66 ++++-
 drivers/hwtracing/coresight/coresight.c       |   2 +-
 include/linux/coresight.h                     |   7 +
 4 files changed, 327 insertions(+), 8 deletions(-)

Comments

Suzuki K Poulose June 20, 2019, 4:45 p.m. UTC | #1
On 18/06/2019 13:54, Andrew Murray wrote:
> Some hardware will ignore bit TRCPDCR.PU which is used to signal
> to hardware that power should not be removed from the trace unit.
> Let's mitigate against this by saving and restoring the trace
> unit state when the CPU enters low power states.
> 
> To provide a benefit to both self-hosted and external debuggers
> we save/restore the entire state which includes etmv4_config data
> and dynamic data such as inflight counter values, sequencer
> states, etc.

Andrew,

Please could you also mention that there is a kernel command line parameter
to control the save/restore here and in the patch which introduces it ?
I think this missing information is creating the confusion.

Cheers
Suzuki
Andrew Murray June 20, 2019, 4:57 p.m. UTC | #2
On Thu, Jun 20, 2019 at 05:45:11PM +0100, Suzuki K Poulose wrote:
> 
> 
> On 18/06/2019 13:54, Andrew Murray wrote:
> > Some hardware will ignore bit TRCPDCR.PU which is used to signal
> > to hardware that power should not be removed from the trace unit.
> > Let's mitigate against this by saving and restoring the trace
> > unit state when the CPU enters low power states.
> > 
> > To provide a benefit to both self-hosted and external debuggers
> > we save/restore the entire state which includes etmv4_config data
> > and dynamic data such as inflight counter values, sequencer
> > states, etc.
> 
> Andrew,
> 
> Please could you also mention that there is a kernel command line parameter
> to control the save/restore here and in the patch which introduces it ?
> I think this missing information is creating the confusion.

Yes sure.

Thanks,

Andrew Murray

> 
> Cheers
> Suzuki