<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/coresight.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-12-18T12:54:57+00:00</updated>
<entry>
<title>coresight: Change device mode to atomic type</title>
<updated>2025-12-18T12:54:57+00:00</updated>
<author>
<name>Leo Yan</name>
<email>leo.yan@arm.com</email>
</author>
<published>2025-11-11T18:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fef8b751d8d051dc60bb8dced7359e83dcfc25a2'/>
<id>urn:sha1:fef8b751d8d051dc60bb8dced7359e83dcfc25a2</id>
<content type='text'>
[ Upstream commit 693d1eaca940f277af24c74873ef2313816ff444 ]

The device mode is defined as local type. This type cannot promise
SMP-safe access.

Change to atomic type and impose relax ordering, which ensures the
SMP-safe synchronisation and the ordering between the mode setting and
relevant operations.

Fixes: 22fd532eaa0c ("coresight: etm3x: adding operation mode for etm_enable()")
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Tested-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Leo Yan &lt;leo.yan@arm.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20251111-arm_coresight_power_management_fix-v6-1-f55553b6c8b3@arm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>coresight: Fixes device's owner field for registered using coresight_init_driver()</title>
<updated>2025-06-19T13:32:12+00:00</updated>
<author>
<name>Junhao He</name>
<email>hejunhao3@huawei.com</email>
</author>
<published>2024-09-18T03:53:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1183a72221d5c7af0c821bd492c7522493eec07d'/>
<id>urn:sha1:1183a72221d5c7af0c821bd492c7522493eec07d</id>
<content type='text'>
[ Upstream commit 9f52aecc952ddf307571517d5c91136c8c4e87c9 ]

The coresight_init_driver() of the coresight-core module is called from
the sub coresgiht device (such as tmc/stm/funnle/...) module. It calls
amba_driver_register() and Platform_driver_register(), which are macro
functions that use the coresight-core's module to initialize the caller's
owner field.  Therefore, when the sub coresight device calls
coresight_init_driver(), an incorrect THIS_MODULE value is captured.

The sub coesgiht modules can be removed while their callbacks are
running, resulting in a general protection failure.

Add module parameter to coresight_init_driver() so can be called
with the module of the callback.

Fixes: 075b7cd7ad7d ("coresight: Add helpers registering/removing both AMBA and platform drivers")
Signed-off-by: Junhao He &lt;hejunhao3@huawei.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240918035327.9710-1-hejunhao3@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>coresight-etm4x: add isb() before reading the TRCSTATR</title>
<updated>2025-04-10T12:39:22+00:00</updated>
<author>
<name>Yuanfang Zhang</name>
<email>quic_yuanfang@quicinc.com</email>
</author>
<published>2025-01-16T09:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1315b08f609ee17d8ccccd8fa2e384ba6853e373'/>
<id>urn:sha1:1315b08f609ee17d8ccccd8fa2e384ba6853e373</id>
<content type='text'>
[ Upstream commit 4ff6039ffb79a4a8a44b63810a8a2f2b43264856 ]

As recommended by section 4.3.7 ("Synchronization when using system
instructions to progrom the trace unit") of ARM IHI 0064H.b, the
self-hosted trace analyzer must perform a Context synchronization
event between writing to the TRCPRGCTLR and reading the TRCSTATR.
Additionally, add an ISB between the each read of TRCSTATR on
coresight_timeout() when using system instructions to program the
trace unit.

Fixes: 1ab3bb9df5e3 ("coresight: etm4x: Add necessary synchronization for sysreg access")
Signed-off-by: Yuanfang Zhang &lt;quic_yuanfang@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250116-etm_sync-v4-1-39f2b05e9514@quicinc.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>coresight: Make trace ID map spinlock local to the map</title>
<updated>2024-08-20T14:02:38+00:00</updated>
<author>
<name>James Clark</name>
<email>james.clark@arm.com</email>
</author>
<published>2024-07-22T10:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=988d40a4d4e7d671305bea501562a5d1a1d479fa'/>
<id>urn:sha1:988d40a4d4e7d671305bea501562a5d1a1d479fa</id>
<content type='text'>
Reduce contention on the lock by replacing the global lock with one for
each map.

Signed-off-by: James Clark &lt;james.clark@arm.com&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240722101202.26915-18-james.clark@linaro.org
</content>
</entry>
<entry>
<title>coresight: Remove pending trace ID release mechanism</title>
<updated>2024-08-20T14:02:38+00:00</updated>
<author>
<name>James Clark</name>
<email>james.clark@arm.com</email>
</author>
<published>2024-07-22T10:11:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de0029fdde86092c75472c92e56a962f4edee0f6'/>
<id>urn:sha1:de0029fdde86092c75472c92e56a962f4edee0f6</id>
<content type='text'>
Pending the release of IDs was a way of managing concurrent sysfs and
Perf sessions in a single global ID map. Perf may have finished while
sysfs hadn't, and Perf shouldn't release the IDs in use by sysfs and
vice versa.

Now that Perf uses its own exclusive ID maps, pending release doesn't
result in any different behavior than just releasing all IDs when the
last Perf session finishes. As part of the per-sink trace ID change, we
would have still had to make the pending mechanism work on a per-sink
basis, due to the overlapping ID allocations, so instead of making that
more complicated, just remove it.

Signed-off-by: James Clark &lt;james.clark@arm.com&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240722101202.26915-16-james.clark@linaro.org
</content>
</entry>
<entry>
<title>coresight: Use per-sink trace ID maps for Perf sessions</title>
<updated>2024-08-20T14:02:38+00:00</updated>
<author>
<name>James Clark</name>
<email>james.clark@arm.com</email>
</author>
<published>2024-07-22T10:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ad628a7617607baac53745f8025638b967470a2'/>
<id>urn:sha1:5ad628a7617607baac53745f8025638b967470a2</id>
<content type='text'>
This will allow sessions with more than CORESIGHT_TRACE_IDS_MAX ETMs
as long as there are fewer than that many ETMs connected to each sink.

Each sink owns its own trace ID map, and any Perf session connecting to
that sink will allocate from it, even if the sink is currently in use by
other users. This is similar to the existing behavior where the dynamic
trace IDs are constant as long as there is any concurrent Perf session
active. It's not completely optimal because slightly more IDs will be
used than necessary, but the optimal solution involves tracking the PIDs
of each session and allocating ID maps based on the session owner. This
is difficult to do with the combination of per-thread and per-cpu modes
and some scheduling issues. The complexity of this isn't likely to worth
it because even with multiple users they'd just see a difference in the
ordering of ID allocations rather than hitting any limits (unless the
hardware does have too many ETMs connected to one sink).

Signed-off-by: James Clark &lt;james.clark@arm.com&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240722101202.26915-15-james.clark@linaro.org
</content>
</entry>
<entry>
<title>coresight: Make CPU id map a property of a trace ID map</title>
<updated>2024-08-20T14:02:38+00:00</updated>
<author>
<name>James Clark</name>
<email>james.clark@arm.com</email>
</author>
<published>2024-07-22T10:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d53c8253c7822fbc524adcd950e7c6de6a229c99'/>
<id>urn:sha1:d53c8253c7822fbc524adcd950e7c6de6a229c99</id>
<content type='text'>
The global CPU ID mappings won't work for per-sink ID maps so move it to
the ID map struct. coresight_trace_id_release_all_pending() is hard
coded to operate on the default map, but once Perf sessions use their
own maps the pending release mechanism will be deleted. So it doesn't
need to be extended to accept a trace ID map argument at this point.

Signed-off-by: James Clark &lt;james.clark@arm.com&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Tested-by: Leo Yan &lt;leo.yan@arm.com&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240722101202.26915-14-james.clark@linaro.org
</content>
</entry>
<entry>
<title>coresight: Move struct coresight_trace_id_map to common header</title>
<updated>2024-08-20T14:02:37+00:00</updated>
<author>
<name>James Clark</name>
<email>james.clark@arm.com</email>
</author>
<published>2024-07-22T10:11:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=acb0184fe9bca3bb7103dadc76ba9d38c969ca86'/>
<id>urn:sha1:acb0184fe9bca3bb7103dadc76ba9d38c969ca86</id>
<content type='text'>
The trace ID maps will need to be created and stored by the core and
Perf code so move the definition up to the common header.

Reviewed-by: Anshuman Khandual &lt;anshuman.khandual@arm.com&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@arm.com&gt;
Tested-by: Leo Yan &lt;leo.yan@arm.com&gt;
Tested-by: Ganapatrao Kulkarni &lt;gankulkarni@os.amperecomputing.com&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240722101202.26915-12-james.clark@linaro.org
</content>
</entry>
<entry>
<title>coresight: Remove duplicate linux/amba/bus.h header</title>
<updated>2024-04-24T13:22:41+00:00</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2024-04-24T02:24:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8293395b9caa57e38cc05b9102d4ec7835b0a0f'/>
<id>urn:sha1:e8293395b9caa57e38cc05b9102d4ec7835b0a0f</id>
<content type='text'>
./include/linux/coresight.h: linux/amba/bus.h is included more than once.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8869
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Reviewed-by: James Clark &lt;james.clark@arm.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240424022420.58516-1-jiapeng.chong@linux.alibaba.com
</content>
</entry>
<entry>
<title>coresight: Add helpers registering/removing both AMBA and platform drivers</title>
<updated>2024-04-16T10:30:41+00:00</updated>
<author>
<name>Anshuman Khandual</name>
<email>anshuman.khandual@arm.com</email>
</author>
<published>2024-03-14T05:58:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=075b7cd7ad7dec8651a6a6654fa5ebae436ac00f'/>
<id>urn:sha1:075b7cd7ad7dec8651a6a6654fa5ebae436ac00f</id>
<content type='text'>
This adds two different helpers i.e coresight_init_driver()/remove_driver()
enabling coresight devices to register or remove AMBA and platform drivers.
This changes replicator and funnel devices to use above new helpers.

Cc: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Cc: Mike Leach &lt;mike.leach@linaro.org&gt;
Cc: James Clark &lt;james.clark@arm.com&gt;
Cc: Leo Yan &lt;leo.yan@linaro.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: coresight@lists.linaro.org
Reviewed-by: James Clark &lt;james.clark@arm.com&gt;
Signed-off-by: Anshuman Khandual &lt;anshuman.khandual@arm.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20240314055843.2625883-5-anshuman.khandual@arm.com
</content>
</entry>
</feed>
