Patch "coresight: Fix disabling of CoreSight TPIU" has been added to the 4.14-stable tree
This is a note to let you know that I've just added the patch titled
coresight: Fix disabling of CoreSight TPIU
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
coresight-fix-disabling-of-coresight-tpiu.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Mar 22 14:26:48 CET 2018
From: Robert Walker <[email protected]>
Date: Mon, 18 Dec 2017 11:05:44 -0700
Subject: coresight: Fix disabling of CoreSight TPIU
From: Robert Walker <[email protected]>
[ Upstream commit 11595db8e17faaa05fadc25746c870e31276962f ]
The CoreSight TPIU should be disabled when tracing to other sinks to allow them to operate at full bandwidth.
This patch fixes tpiu_disable_hw() to correctly disable the TPIU by configuring the TPIU to stop on flush, initiating a manual flush, waiting for the flush to complete and then waits for the TPIU to indicate it has stopped.
--- drivers/hwtracing/coresight/coresight-tpiu.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/hwtracing/coresight/coresight-tpiu.c +10 -3
@@ -46,8 +46,11 @@#define TPIU_ITATBCTR0 0xef8/** register definition **/ +/* FFSR - 0x300 */ +#define FFSR_FT_STOPPED BIT(1)/* FFCR - 0x304 */ #define FFCR_FON_MAN BIT(6) +#define FFCR_STOP_FI BIT(12)/** * @base: memory mapped base address for this component.
@@ -85,10 +88,14 @@ static void tpiu_disable_hw(struct tpiu_ {CS_UNLOCK (drvdata->base); -/* Clear formatter controle reg. */ -writel_relaxed (0x0 , drvdata->base +TPIU_FFCR ); +/* Clear formatter and stop on flush */ +writel_relaxed (FFCR_STOP_FI , drvdata->base +TPIU_FFCR );/* Generate manual flush */ -writel_relaxed (FFCR_FON_MAN , drvdata->base +TPIU_FFCR ); +writel_relaxed (FFCR_STOP_FI |FFCR_FON_MAN , drvdata->base +TPIU_FFCR ); +/* Wait for flush to complete */ +coresight_timeout (drvdata->base,TPIU_FFCR ,FFCR_FON_MAN ,0 ); +/* Wait for formatter to stop */ +coresight_timeout (drvdata->base,TPIU_FFSR ,FFSR_FT_STOPPED ,1 );CS_LOCK (drvdata->base); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/coresight-fix-disabling-of-coresight-tpiu.patch