** Description changed:

  SRU Justification:
  
  [Impact]
  
  When CONFIG_CORESIGHT is enabled, noble 6.8.0-102 fails to build with
  the following errors:
  
  ```
  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);
-       |               ^~~~~~~~~~~~~~~~~~~~~
+   728 |         ret = coresight_init_driver("catu", &catu_driver, 
&catu_platform_driver);
+       |               ^~~~~~~~~~~~~~~~~~~~~
  drivers/hwtracing/coresight/coresight-catu.c: In function 'catu_exit':
  drivers/hwtracing/coresight/coresight-catu.c:736:9: error: implicit 
declaration of function 'coresight_remove_driver'; did you mean 
'coresight_remove_links'? [-Werror=implicit-function-declaration]
-   736 |         coresight_remove_driver(&catu_driver, &catu_platform_driver);
-       |         ^~~~~~~~~~~~~~~~~~~~~~~
-       |         coresight_remove_links
+   736 |         coresight_remove_driver(&catu_driver, &catu_platform_driver);
+       |         ^~~~~~~~~~~~~~~~~~~~~~~
+       |         coresight_remove_links
+ ...
  drivers/hwtracing/coresight/coresight-tmc-core.c: In function '__tmc_probe':
  drivers/hwtracing/coresight/coresight-tmc-core.c:500:65: error: 'id' 
undeclared (first use in this function); did you mean 'fd'?
-   500 |                                          coresight_get_uci_data(id));
-       |                                                                 ^~
-       |                                                                 fd
+   500 |                                          coresight_get_uci_data(id));
+       |                                                                 ^~
+       |                                                                 fd
  drivers/hwtracing/coresight/coresight-tmc-core.c:500:65: note: each 
undeclared identifier is reported only once for each function it appears in
+ ...
  drivers/hwtracing/coresight/coresight-tmc-core.c: In function 'tmc_init':
  drivers/hwtracing/coresight/coresight-tmc-core.c:728:16: error: implicit 
declaration of function 'coresight_init_driver' 
[-Werror=implicit-function-declaration]
-   728 |         return coresight_init_driver("tmc", &tmc_driver, 
&tmc_platform_driver);
-       |                ^~~~~~~~~~~~~~~~~~~~~
+   728 |         return coresight_init_driver("tmc", &tmc_driver, 
&tmc_platform_driver);
+       |                ^~~~~~~~~~~~~~~~~~~~~
  drivers/hwtracing/coresight/coresight-tmc-core.c: In function 'tmc_exit':
  drivers/hwtracing/coresight/coresight-tmc-core.c:733:9: error: implicit 
declaration of function 'coresight_remove_driver'; did you mean 
'coresight_remove_links'? [-Werror=implicit-function-declaration]
-   733 |         coresight_remove_driver(&tmc_driver, &tmc_platform_driver);
-       |         ^~~~~~~~~~~~~~~~~~~~~~~
-       |         coresight_remove_links
+   733 |         coresight_remove_driver(&tmc_driver, &tmc_platform_driver);
+       |         ^~~~~~~~~~~~~~~~~~~~~~~
+       |         coresight_remove_links
+ ...
+ drivers/hwtracing/coresight/coresight-tpdm.c: In function 'tpdm_enable':
+ drivers/hwtracing/coresight/coresight-tpdm.c:299:14: error: implicit 
declaration of function 'coresight_take_mode'; did you mean 
'coresight_make_links'? [-Werror=implicit-function-declaration]
+   299 |         if (!coresight_take_mode(csdev, mode)) {
+       |              ^~~~~~~~~~~~~~~~~~~
+       |              coresight_make_links
+ drivers/hwtracing/coresight/coresight-tpdm.c: In function 'tpdm_disable':
+ drivers/hwtracing/coresight/coresight-tpdm.c:345:9: error: implicit 
declaration of function 'coresight_set_mode'; did you mean 'coresight_get_pid'? 
[-Werror=implicit-function-declaration]
+   345 |         coresight_set_mode(csdev, CS_MODE_DISABLED);
+       |         ^~~~~~~~~~~~~~~~~~
+       |         coresight_get_pid
+ drivers/hwtracing/coresight/coresight-dummy.c: In function 
'dummy_source_enable':
+ drivers/hwtracing/coresight/coresight-dummy.c:26:14: error: implicit 
declaration of function 'coresight_take_mode'; did you mean 
'coresight_make_links'? [-Werror=implicit-function-declaration]
+    26 |         if (!coresight_take_mode(csdev, mode))
+       |              ^~~~~~~~~~~~~~~~~~~
+       |              coresight_make_links
+ drivers/hwtracing/coresight/coresight-dummy.c: In function 
'dummy_source_disable':
+ drivers/hwtracing/coresight/coresight-dummy.c:37:9: error: implicit 
declaration of function 'coresight_set_mode'; did you mean 'coresight_get_pid'? 
[-Werror=implicit-function-declaration]
+    37 |         coresight_set_mode(csdev, CS_MODE_DISABLED);
+       |         ^~~~~~~~~~~~~~~~~~
+       |         coresight_get_pid
  ```
  
  These errors are a result of including the following patches in upstream
  stable updates, but missing some dependencies from the original patch
  sets:
  
-   Error description: __tmc_probe:id not defined
-   Break commit: n/linux aaf260b9572e ("coresight: tmc: Move ACPI support from 
AMBA driver to platform driver")
-   Missing commit: 852e9a32058a ("coresight: stm: Extract device name from 
AMBA pid based table lookup")
-                   3ab210297c31 ("coresight: tmc: Extract device properties 
from AMBA pid based table lookup")
-   Patch series: "coresight: Move remaining AMBA ACPI devices into platform 
driver"
-                 
(https://lists-ec2.linaro.org/archives/list/[email protected]/thread/XGJAJMHSDE5P7YSX33CIW5DHKR6C343L/)
+   Error description: __tmc_probe:id not defined
+   Break commit: n/linux aaf260b9572e ("coresight: tmc: Move ACPI support from 
AMBA driver to platform driver")
+   Missing commit: 852e9a32058a ("coresight: stm: Extract device name from 
AMBA pid based table lookup")
+                   3ab210297c31 ("coresight: tmc: Extract device properties 
from AMBA pid based table lookup")
+   Patch series: "coresight: Move remaining AMBA ACPI devices into platform 
driver"
+                 
(https://lists-ec2.linaro.org/archives/list/[email protected]/thread/XGJAJMHSDE5P7YSX33CIW5DHKR6C343L/)
  
-   Error description: coresight_{init,remove}_driver not defined
-   Break commit: n/linux aaf260b9572e ("coresight: tmc: Move ACPI support from 
AMBA driver to platform driver")
-   Missing commit: 075b7cd7ad7d ("coresight: Add helpers registering/removing 
both AMBA and platform drivers")
-   Patch series: "coresight: Move remaining AMBA ACPI devices into platform 
driver"
-                 
(https://lists-ec2.linaro.org/archives/list/[email protected]/thread/XGJAJMHSDE5P7YSX33CIW5DHKR6C343L/)
+   Error description: catu,tmc: coresight_{init,remove}_driver not defined
+   Break commit: n/linux aaf260b9572e ("coresight: tmc: Move ACPI support from 
AMBA driver to platform driver")
+                 n/linux cf08211db65c ("coresight: catu: Move ACPI support 
from AMBA driver to platform driver")
+   Missing commit: 075b7cd7ad7d ("coresight: Add helpers registering/removing 
both AMBA and platform drivers")
+   Patch series: "coresight: Move remaining AMBA ACPI devices into platform 
driver"
+                 
(https://lists-ec2.linaro.org/archives/list/[email protected]/thread/XGJAJMHSDE5P7YSX33CIW5DHKR6C343L/)
+   
+   Error description: tpdm,dummy: coresight_{set,take}_mode not defined
+   Break commit: n/linux f30974e15e66 ("Coresight: Set correct cs_mode for 
TPDM to fix disable issue")
+                 n/linux e76e67682488 ("Coresight: Set correct cs_mode for 
dummy source to fix disable issue")
+   Missing commit: d724f65218b9 ("coresight: Add helper for atomically taking 
the device")
+   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 commits:
- 852e9a32058a ("coresight: stm: Extract device name from AMBA pid based table 
lookup")
- 3ab210297c31 ("coresight: tmc: Extract device properties from AMBA pid based 
table lookup")
- 075b7cd7ad7d ("coresight: Add helpers registering/removing both AMBA and 
platform drivers")
- from the series:
- "coresight: Move remaining AMBA ACPI devices into platform driver".
- 
- NOTE: The series also has "Move remaining AMBA ACPI devices into platform 
driver"
- commits for the remaining devices, but I elected not to port them. We have
- the respective commits for tmc and catu applied because they were
- dependencies of "{tmc,catu}: Support atclk", but since the commits for the
- other devices are not necessary for the patches to apply, and as of now there
- are no upstream stable candidates with "Fixes" for the other devices, I don't
- think it's worth the increased change size. Fortunately, if they are needed
- in the future, they are clean cherry-picks (besides simple context changes)
- and we have all the dependencies.
+ Revert the break commits.
  
  [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 because these commits are only small
- refactors that don't change behaviour. Only static function definitions are
- modified, and functionality is only added via new helpers, not removed.
- The new patches have a potential to create conflicts for derivative kernels
- and other downstream projects that rebase on this kernel.
+ These reverts are technically removing fixes from the tree, which have the
+ potential to cause behaviour changes or regressions. However, the generic
+ kernel has never been able to build these coresight features, and thus we have
+ not observed any examples of the issue the patches intended to fix.

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

Title:
  Coresight fails to build on 6.8.0-102 due to missing function and arg
  definitions

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


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

Reply via email to