]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Coresight: Set correct cs_mode for TPDM to fix disable issue
authorJie Gan <quic_jiegan@quicinc.com>
Mon, 12 Aug 2024 04:30:43 +0000 (12:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:38:22 +0000 (16:38 +0200)
commit03b2956ce10a4a19c2225d16ece7e345f9cdb562
treebe49ae728cf6b8302c12d9e73ef6e49e0332d624
parentca6c500b598b7715e5ecb26780b245d98483e1ba
Coresight: Set correct cs_mode for TPDM to fix disable issue

[ Upstream commit 14f5fa9b5fcbe2b3d5098893aba6ad62254d2ef6 ]

The coresight_disable_source_sysfs function should verify the
mode of the coresight device before disabling the source.

However, the mode for the TPDM device is always set to
CS_MODE_DISABLED, resulting in the check consistently failing.
As a result, TPDM cannot be properly disabled.

Configure CS_MODE_SYSFS/CS_MODE_PERF during the enablement.
Configure CS_MODE_DISABLED during the disablement.

Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver")
Signed-off-by: Jie Gan <quic_jiegan@quicinc.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240812043043.2890694-1-quic_jiegan@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-tpdm.c