<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/include/linux/coresight.h, branch v6.15.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>coresight: change coresight_trace_id_map's lock type to raw_spinlock_t</title>
<updated>2025-03-10T10:40:25+00:00</updated>
<author>
<name>Yeoreum Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-03-06T12:11:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4cf364ca57d851e192ce02e98d314d22fa514895'/>
<id>4cf364ca57d851e192ce02e98d314d22fa514895</id>
<content type='text'>
coresight_trace_id_map-&gt;lock can be acquired while coresight devices'
drvdata_lock.

But the drvdata_lock can be raw_spinlock_t (i.e) coresight-etm4x.

To address this, change type of coresight_trace_id_map-&gt;lock to
raw_spinlock_t

Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250306121110.1647948-4-yeoreum.yun@arm.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
coresight_trace_id_map-&gt;lock can be acquired while coresight devices'
drvdata_lock.

But the drvdata_lock can be raw_spinlock_t (i.e) coresight-etm4x.

To address this, change type of coresight_trace_id_map-&gt;lock to
raw_spinlock_t

Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250306121110.1647948-4-yeoreum.yun@arm.com
</pre>
</div>
</content>
</entry>
<entry>
<title>coresight: change coresight_device lock type to raw_spinlock_t</title>
<updated>2025-03-10T10:40:25+00:00</updated>
<author>
<name>Yeoreum Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-03-06T12:11:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=26f060c106f630e34876c096c1c8997a9e68c371'/>
<id>26f060c106f630e34876c096c1c8997a9e68c371</id>
<content type='text'>
coresight_device-&gt;cscfg_csdev_lock can be held during __schedule()
by perf_event_task_sched_out()/in().

Since coresight-&gt;cscfg_csdev_lock type is spinlock_t and
perf_event_task_sched_out()/in() is called after acquiring rq_lock,
which is raw_spinlock_t (an unsleepable lock),
this poses an issue in PREEMPT_RT kernel where spinlock_t is sleepable.

To address this, change type of coresight_device-&gt;cscfg_csdev_lock
from spinlock_t to raw_spinlock_t.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250306121110.1647948-2-yeoreum.yun@arm.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
coresight_device-&gt;cscfg_csdev_lock can be held during __schedule()
by perf_event_task_sched_out()/in().

Since coresight-&gt;cscfg_csdev_lock type is spinlock_t and
perf_event_task_sched_out()/in() is called after acquiring rq_lock,
which is raw_spinlock_t (an unsleepable lock),
this poses an issue in PREEMPT_RT kernel where spinlock_t is sleepable.

To address this, change type of coresight_device-&gt;cscfg_csdev_lock
from spinlock_t to raw_spinlock_t.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: Mike Leach &lt;mike.leach@linaro.org&gt;
Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250306121110.1647948-2-yeoreum.yun@arm.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Coresight: Add Coresight TMC Control Unit driver</title>
<updated>2025-03-04T18:06:19+00:00</updated>
<author>
<name>Jie Gan</name>
<email>quic_jiegan@quicinc.com</email>
</author>
<published>2025-03-03T03:29:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f78d206f3d73446e4c3568946a26f903da2149b4'/>
<id>f78d206f3d73446e4c3568946a26f903da2149b4</id>
<content type='text'>
The Coresight TMC Control Unit hosts miscellaneous configuration registers
which control various features related to TMC ETR sink.

Based on the trace ID, which is programmed in the related CTCU ATID
register of a specific ETR, trace data with that trace ID gets into
the ETR buffer, while other trace data gets dropped.

Enabling source device sets one bit of the ATID register based on
source device's trace ID.
Disabling source device resets the bit according to the source
device's trace ID.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-10-quic_jiegan@quicinc.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Coresight TMC Control Unit hosts miscellaneous configuration registers
which control various features related to TMC ETR sink.

Based on the trace ID, which is programmed in the related CTCU ATID
register of a specific ETR, trace data with that trace ID gets into
the ETR buffer, while other trace data gets dropped.

Enabling source device sets one bit of the ATID register based on
source device's trace ID.
Disabling source device resets the bit according to the source
device's trace ID.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-10-quic_jiegan@quicinc.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Coresight: Change to read the trace ID from coresight_path</title>
<updated>2025-03-04T18:06:18+00:00</updated>
<author>
<name>Jie Gan</name>
<email>quic_jiegan@quicinc.com</email>
</author>
<published>2025-03-03T03:29:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7b365f056d8e02fc70c823bdf736e41a7236a54b'/>
<id>7b365f056d8e02fc70c823bdf736e41a7236a54b</id>
<content type='text'>
The source device can directly read the trace ID from the coresight_path
which result in etm_read_alloc_trace_id and etm4_read_alloc_trace_id being
deleted.

Co-developed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-7-quic_jiegan@quicinc.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The source device can directly read the trace ID from the coresight_path
which result in etm_read_alloc_trace_id and etm4_read_alloc_trace_id being
deleted.

Co-developed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-7-quic_jiegan@quicinc.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Coresight: Introduce a new struct coresight_path</title>
<updated>2025-03-04T18:06:18+00:00</updated>
<author>
<name>Jie Gan</name>
<email>quic_jiegan@quicinc.com</email>
</author>
<published>2025-03-03T03:29:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3c03c49b2fa59c4d456e2d673fe5847fa6cbcdf2'/>
<id>3c03c49b2fa59c4d456e2d673fe5847fa6cbcdf2</id>
<content type='text'>
Introduce a new strcuture, 'struct coresight_path', to store the data that
utilized by the devices in the path. The coresight_path will be built/released
by coresight_build_path/coresight_release_path functions.

Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-5-quic_jiegan@quicinc.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new strcuture, 'struct coresight_path', to store the data that
utilized by the devices in the path. The coresight_path will be built/released
by coresight_build_path/coresight_release_path functions.

Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-5-quic_jiegan@quicinc.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Coresight: Add trace_id function to retrieving the trace ID</title>
<updated>2025-03-04T14:48:49+00:00</updated>
<author>
<name>Jie Gan</name>
<email>quic_jiegan@quicinc.com</email>
</author>
<published>2025-03-03T03:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c367a89dec267c65b556ace5d6aafd07fb1d66b1'/>
<id>c367a89dec267c65b556ace5d6aafd07fb1d66b1</id>
<content type='text'>
Add 'trace_id' function pointer in coresight_ops. It's responsible for retrieving
the device's trace ID.

Co-developed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-3-quic_jiegan@quicinc.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add 'trace_id' function pointer in coresight_ops. It's responsible for retrieving
the device's trace ID.

Co-developed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-3-quic_jiegan@quicinc.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Coresight: Add support for new APB clock name</title>
<updated>2025-03-04T14:48:43+00:00</updated>
<author>
<name>Jie Gan</name>
<email>quic_jiegan@quicinc.com</email>
</author>
<published>2025-03-03T03:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dc872c5f527a07124b2ad92d8c70d11829f17ac9'/>
<id>dc872c5f527a07124b2ad92d8c70d11829f17ac9</id>
<content type='text'>
Add support for new APB clock-name. If the function fails
to obtain the clock with the name "apb_pclk", it will
attempt to acquire the clock with the name "apb".

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-2-quic_jiegan@quicinc.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for new APB clock-name. If the function fails
to obtain the clock with the name "apb_pclk", it will
attempt to acquire the clock with the name "apb".

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Jie Gan &lt;quic_jiegan@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20250303032931.2500935-2-quic_jiegan@quicinc.com
</pre>
</div>
</content>
</entry>
<entry>
<title>coresight-etm4x: add isb() before reading the TRCSTATR</title>
<updated>2025-02-26T11:25:05+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.tavy.me/linux-stable.git/commit/?id=4ff6039ffb79a4a8a44b63810a8a2f2b43264856'/>
<id>4ff6039ffb79a4a8a44b63810a8a2f2b43264856</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>coresight: core: Add provision for panic callbacks</title>
<updated>2025-02-21T16:17:13+00:00</updated>
<author>
<name>Linu Cherian</name>
<email>lcherian@marvell.com</email>
</author>
<published>2025-02-12T11:49:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=46006ceb5d029f92df405db15c9a31f0ee41628c'/>
<id>46006ceb5d029f92df405db15c9a31f0ee41628c</id>
<content type='text'>
Panic callback handlers allows coresight device drivers to sync
relevant trace data and trace metadata to reserved memory
regions so that they can be retrieved later in the subsequent
boot or in the crashdump kernel.

Signed-off-by: Linu Cherian &lt;lcherian@marvell.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/20250212114918.548431-4-lcherian@marvell.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Panic callback handlers allows coresight device drivers to sync
relevant trace data and trace metadata to reserved memory
regions so that they can be retrieved later in the subsequent
boot or in the crashdump kernel.

Signed-off-by: Linu Cherian &lt;lcherian@marvell.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/20250212114918.548431-4-lcherian@marvell.com
</pre>
</div>
</content>
</entry>
<entry>
<title>coresight: Add support for trace filtering by source</title>
<updated>2024-12-13T10:25:15+00:00</updated>
<author>
<name>Tao Zhang</name>
<email>quic_taozha@quicinc.com</email>
</author>
<published>2024-12-13T10:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ec9903d6cc34e61b77e609a0425e7a0a804fb95a'/>
<id>ec9903d6cc34e61b77e609a0425e7a0a804fb95a</id>
<content type='text'>
Some replicators have hard coded filtering of "trace" data, based on the
source device. This is different from the trace filtering based on
TraceID, available in the standard programmable replicators. e.g.,
Qualcomm replicators have filtering based on custom trace protocol
format and is not programmable.

The source device could be connected to the replicator via intermediate
components (e.g., a funnel). Thus we need platform information from
the firmware tables to decide the source device corresponding to a
given output port from the replicator. Given this affects "trace
path building" and traversing the path back from the sink to source,
add the concept of "filtering by source" to the generic coresight
connection.

The specified source will be marked like below in the Devicetree.
test-replicator {
    ... ... ... ...
    out-ports {
        ... ... ... ...
        port@0 {
            reg = &lt;0&gt;;
            xyz: endpoint {
                remote-endpoint = &lt;&amp;zyx&gt;;
                filter-source = &lt;&amp;source_1&gt;; &lt;-- To specify the source to
            };                           be filtered out here.
        };

        port@1 {
            reg = &lt;1&gt;;
            abc: endpoint {
                remote-endpoint = &lt;&amp;cba&gt;;
                filter-source = &lt;&amp;source_2&gt;; &lt;-- To specify the source to
            };                           be filtered out here.
        };
    };
};

Signed-off-by: Tao Zhang &lt;quic_taozha@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20241213100731.25914-4-quic_taozha@quicinc.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some replicators have hard coded filtering of "trace" data, based on the
source device. This is different from the trace filtering based on
TraceID, available in the standard programmable replicators. e.g.,
Qualcomm replicators have filtering based on custom trace protocol
format and is not programmable.

The source device could be connected to the replicator via intermediate
components (e.g., a funnel). Thus we need platform information from
the firmware tables to decide the source device corresponding to a
given output port from the replicator. Given this affects "trace
path building" and traversing the path back from the sink to source,
add the concept of "filtering by source" to the generic coresight
connection.

The specified source will be marked like below in the Devicetree.
test-replicator {
    ... ... ... ...
    out-ports {
        ... ... ... ...
        port@0 {
            reg = &lt;0&gt;;
            xyz: endpoint {
                remote-endpoint = &lt;&amp;zyx&gt;;
                filter-source = &lt;&amp;source_1&gt;; &lt;-- To specify the source to
            };                           be filtered out here.
        };

        port@1 {
            reg = &lt;1&gt;;
            abc: endpoint {
                remote-endpoint = &lt;&amp;cba&gt;;
                filter-source = &lt;&amp;source_2&gt;; &lt;-- To specify the source to
            };                           be filtered out here.
        };
    };
};

Signed-off-by: Tao Zhang &lt;quic_taozha@quicinc.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Link: https://lore.kernel.org/r/20241213100731.25914-4-quic_taozha@quicinc.com
</pre>
</div>
</content>
</entry>
</feed>
