ACK/Cmnt: [SRU][N][PATCH v2 0/1] Coresight fails to build on 6.8.0-101 due to 'atomic_t' member accessed as 'int'

Stefan Bader stefan.bader at canonical.com
Wed Feb 25 08:53:34 UTC 2026


On 24/02/2026 08:33, Noah Wager wrote:
> BugLink: https://bugs.launchpad.net/bugs/2142336
> 
> SRU Justification:
> 
> [Impact]
> 
> When CONFIG_CORESIGHT is enabled, noble 6.8.0-101 fails to build with the following errors:
> 
> ```
> drivers/hwtracing/coresight/coresight-catu.c: In function 'catu_enable':
> drivers/hwtracing/coresight/coresight-catu.c:465:27: error: invalid operands to binary == (have 'atomic_t' and 'int')
>    465 |         if (csdev->refcnt == 0) {
>        |             ~~~~~~~~~~~~~ ^~
>        |                  |
>        |                  atomic_t
> drivers/hwtracing/coresight/coresight-catu.c:471:30: error: wrong type argument to increment
>    471 |                 csdev->refcnt++;
>        |                              ^~
> drivers/hwtracing/coresight/coresight-catu.c: In function 'catu_disable':
> drivers/hwtracing/coresight/coresight-catu.c:498:13: error: wrong type argument to decrement
>    498 |         if (--csdev->refcnt == 0) {
>        |             ^~
> ```
> 
> These errors are a result of including the following patch in upstream stable
> updates, but missing some dependencies from the original patch set:
> 
>    Error description: refcnt accessed as int but defined as atomic_t
>    Break commit: n/linux 0e2198d37507 ("coresight: catu: Introduce refcount and spinlock for enabling/disabling")
>    Missing commit: 4545b38ef004 ("coresight: Remove atomic type from refcnt")
>    Patch series: "coresight: Separate sysfs and Perf usage and some other cleanups"
>                  (https://lists.infradead.org/pipermail/linux-arm-kernel/2024-January/899269.html)
> 
> [Fix]
> 
> Cherry-pick upstream commit:
> 4545b38ef004 ("coresight: Remove atomic type from refcnt")
> which requires a few context fixups due to missing commits from the original
> patchset. Those missing patches are not required for this commit, so we can
> just fix and apply it alone to reduce the number of changes.
> 
> NOTE: These are the missing dependent patches for a clean application:
> 
> a0fef3f05cf3 ("coresight: Make language around "activated" sinks consistent")
> a11ebe138b8d ("coresight: Remove ops callback checks")
> 9cae77cf23e3 ("coresight: Move mode to struct coresight_device")
> d5e83f97eb56 ("coresight: Remove the 'enable' field.")
> 1f5149c7751c ("coresight: Move all sysfs code to sysfs file")
> 
> These contain pretty significant refactoring and cleanup (although they don't
> alter behaviour) so they were omitted to reduce changes to a stable kernel.
> 
> [Test Plan]
> 
> Ensure CONFIG_CORESIGHT and CONFIG_CORESIGHT_CATU are enabled, then compile test.
> 
> [Where problems could occur]
> 
> There is a low chance of regression since this patch is purely cleanup and
> does not modify observable behaviour, as stated by the author in the original
> patch set. Additionally, coresight failed to build before this, so this is
> a guaranteed improvement in that respect. There is a risk of breakage if I
> missed some dependent commits, or if my fixups were incorrect.
> 
> 
> James Clark (1):
>    coresight: Remove atomic type from refcnt
> 
>   drivers/hwtracing/coresight/coresight-core.c  |  9 +++++----
>   drivers/hwtracing/coresight/coresight-etb10.c | 11 +++++-----
>   .../hwtracing/coresight/coresight-tmc-etf.c   | 20 ++++++++++---------
>   .../hwtracing/coresight/coresight-tmc-etr.c   | 13 ++++++------
>   drivers/hwtracing/coresight/coresight-tpiu.c  | 14 +++++++++++--
>   drivers/hwtracing/coresight/ultrasoc-smb.c    |  9 +++++----
>   include/linux/coresight.h                     |  7 +++++--
>   7 files changed, 51 insertions(+), 32 deletions(-)
> 

As discussed in the thread, we think all access to refcnt is truly being 
made under some kind of lock and should be safe. As the reason to pick 
up the chain seems to be a fix I would finalize the build breakage by 
picking this follow-up.

Acked-by: Stefan Bader <stefan.bader at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 52669 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260225/8ccb4439/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260225/8ccb4439/attachment-0001.sig>


More information about the kernel-team mailing list