]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Coresight: Set correct cs_mode for dummy source to fix disable issue
authorJie Gan <quic_jiegan@quicinc.com>
Mon, 12 Aug 2024 04:28:44 +0000 (12:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:33:18 +0000 (16:33 +0200)
commit16e2d8eb7185d392d3e2f19851cf2eb0b11be43c
tree731f0594b7aca3ca35811c84177f6a03514c781c
parentc23757a35d364dc1a4141126a03caccaddb61ff1
Coresight: Set correct cs_mode for dummy source to fix disable issue

[ Upstream commit e6b64cda393efd84709ab3df2e42d36d36d7553e ]

The coresight_disable_source_sysfs function should verify the
mode of the coresight device before disabling the source.
However, the mode for the dummy source device is always set to
CS_MODE_DISABLED, resulting in the check consistently failing.
As a result, dummy source cannot be properly disabled.

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

Fixes: 9d3ba0b6c056 ("Coresight: Add coresight dummy 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/20240812042844.2890115-1-quic_jiegan@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/coresight/coresight-dummy.c