** Description changed:

  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) {
        |             ^~
  drivers/hwtracing/coresight/coresight-catu.c: In function 'catu_init':
  drivers/hwtracing/coresight/coresight-catu.c:728:15: error: implicit 
declaration of function 'coresight_init_driver' 
[-Werror=implicit-function-declaration]
    728 |         ret = coresight_init_driver("catu", &catu_driver, 
&catu_platform_driver);
        |               ^~~~~~~~~~~~~~~~~~~~~
  ```
  
  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 involves cherry-picking the commits in the series:
  "coresight: Separate sysfs and Perf usage and some other cleanups"
  up to the fix commit so everything applies cleanly.
  
  NOTE: I decided it would be best to port the entire patch series
  because the rest of the patches, while not *strictly* necessary for a
  successful build, add some clean up and helpers that do not change
  behaviour and may be useful when pulling in future upstream commits,
  as we will be less likely to miss a dependency. All the patches apply
  cleanly.
  
  [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 patchset 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. These changes do alter some function
  and struct definitions, which could cause build failures in downstream 
projects
  that have non-upstream coresight patches reliant on the legacy definitions.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2142336

Title:
  Coresight fails to build on 6.8.0-101 due to 'atomic_t' member
  accessed as 'int'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2142336/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to