Andrew Murray 6da1f22a95 BACKPORT: coresight: etm4x: Save/restore state across CPU low power states
Backport: context code is different from upstream.

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 conditionally saving and restoring
the trace unit state when the CPU enters low power states.

This patchset introduces a firmware property named
'arm,coresight-loses-context-with-cpu' - when this is present the
hardware state will be conditionally saved and restored.

A module parameter 'pm_save_enable' is also introduced which can
be configured to override the firmware property. This can be set
to never allow save/restore or to conditionally allow it (only for
self-hosted). The default value is determined by firmware.

We avoid saving the hardware state when self-hosted coresight isn't
in use to reduce PM latency - we can't determine this by reading the
claim tags (TRCCLAIMCLR) as these are 'trace' registers which need
power and clocking, something we can't easily provide in the PM
context. Therefore we rely on the existing drvdata->mode internal
state that is set when self-hosted coresight is used (and powered).

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20191104181251.26732-2-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(Upstream commit f188b5e76a).

Bug: 140266694
Change-Id: Iec259279eb63a8de2b2b54abfc3cffd552c5e4a8
Signed-off-by: Yabin Cui <yabinc@google.com>
2019-12-03 13:44:31 -08:00
2019-12-03 09:11:59 -08:00
2019-12-01 09:53:43 +01:00
2019-12-01 09:53:43 +01:00
2019-12-01 09:53:43 +01:00
2019-08-06 20:08:18 +02:00
2019-12-01 09:53:43 +01:00
2019-12-01 09:53:43 +01:00
2019-12-01 09:53:43 +01:00
2019-12-01 09:53:43 +01:00
2019-12-01 09:53:43 +01:00
2019-12-01 09:53:43 +01:00
2019-10-17 15:33:07 -07:00
2019-12-01 09:53:43 +01:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%