-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SKIP SOF-TEST] .github/sparse: add imx8 and imx8m for IPC3 coverage #6879
base: main
Are you sure you want to change the base?
Conversation
@lyakh , @dbaluta , any idea why https://github.com/thesofproject/sof/actions/runs/3752405278/jobs/6374525487
and much more |
@marc-hb there are several reasons. One of them is sof/src/platform/imx8/include/platform/lib/memory.h Lines 195 to 198 in 8368a6c
__sparse_cache annotations make sense for iMX8 and all other platforms with the identity cache_to_uncache() mapping. Is this PR just an experiment of yours or is there a requirement to implement this? Maybe we only need sparse checking for TGL and MTL, where cache_to_uncache() are not 1-to-1
|
Maybe the macros should get annotations to avoid these issues without doing anything at runtime, just for the sake of it? I wouldn't have an issue with that. Just a cast without any arithmetic done on the pointer. sparse should be satisfied if we do that? |
@paulstelian97 I'm actually unsure what's better: on the one hand if there isn't a second distinct address space, we shouldn't claim to use it. I.e. on those platforms we shouldn't have additional address spaces and therefore we shouldn't use sparse to verify them. OTOH maybe defining a second address space on all platforms and running sparse on them can help us keep the software uniform and avoid some bugs. |
This was an experiment following your comment in #6876 (comment) The idea was to keep providing sparse coverage for IPC3 code if/when TGL+IPC3 stops building.
I didn't know only TGL and MTL had this. In that case I guess we won't need sparse coverage for IPC3 if/when it does not even build at all for neither TGL nor MTL? |
Hopefully MTL/IPC4 will be sparse-clean before TGL/IPC3 stops building. Otherwise we'll be back to zero green sparse report for a while. |
@lyakh I tend to prefer the uniformity there, and then sparse can detect issues in generic code on any platform really. Plus, even for the platform-specific code, who is to say our future hardware revisions won't have the different address spaces? For that hypothetical it might be beneficial even for platform code to have it in the end (drivers shared between the hardware revisions). I still remember the unrelated issue of Dummy DMA when we enabled the caching (where I had to add the cache control stuff -- discarding or writing back cache lines so that the memcpy can work correctly between host and DSP memory -- later instead of when I initially wrote the driver), I would like other issues to be detected earlier when they don't actually affect us in the end, rather than slow us down when they actually do affect us. |
@paulstelian97 ok, then we need |
@marc-hb it looks like @paulstelian97 does want to have sparse support for their platforms, so I assume they will fix all the issues that your PR has uncovered. Otherwise - it looks like v2.2 branches don't have sparse support, so, then no, doesn't look like we're going to test IPC3 with sparse on Intel platforms. |
Can one of the admins verify this patch? |
Still failing in rebased https://github.com/thesofproject/sof/actions/runs/4405751530/jobs/7717051185 Most of the warnings seem to come from a handful of |
@paulstelian97 I think we should go with your proposed solution:
Please take care of this when you have some bandwidth. |
@marc-hb please let me know if you spot a CL for TGL/ADL/RPL removal. That will royally disrupt our development workflow over here as IPC4 is not even remotely available |
This restores sparse coverage for IPC3. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
4d159a0
to
517905e
Compare
Unrelated but interesting testbench error, @singalsu you may want to track this somewhere:
|
This is really "wild": CMocka tests also failed?! Totally unrelated to this PR too https://github.com/thesofproject/sof/actions/runs/11060897851/job/30732419238?pr=6879 Daily tests have been green for a very long time: https://github.com/thesofproject/sof/actions/runs/11043440815
|
IMX still has sparse errors https://github.com/thesofproject/sof/actions/runs/11060897842/job/30732418315?pr=6879
https://github.com/thesofproject/sof/actions/runs/11060897842/job/30732419025?pr=6879
|
BUT the firmware now builds with XCC and Python 3.10: https://sof-ci.01.org/sofpr/PR6879/build8365/build/firmware_community/tgl.log thanks to some internal changes we just did (internal issue 606 + #9475 (comment)) |
"Mystery" solved, #9496 (comment) was also merged broken - on the same day as #9475 (comment) was merged broken. |
rebase and push to retest CI |
|
Any idea how this started to happen? Or this is the actual first time when we enable this? Looks like the core has also sparse errors:
I will have a look at SOF drivers erros. @LaurentiuM1234 can you please check IMX Zephyr related warnings. |
Other, IPC4 platforms have been passing the sparse check https://github.com/thesofproject/sof/actions/workflows/daily-tests.yml https://github.com/thesofproject/sof/actions/workflows/sparse-zephyr.yml |
This restores sparse coverage for IPC3.
Signed-off-by: Marc Herbert marc.herbert@intel.com
cc: