Skip to content
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

power_domain_intel_adsp.c: revert recent INIT_PRIORITY change #64712

Merged

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Nov 2, 2023

This is a partial revert of one-line from commit 06cfbd4 ("drivers: power_domain: Introduce a gpio monitor driver") which not just introduced a new driver (no problem with that) but also changed the initialization priority of another, unrelated and existing power domain driver without even trying to compile it:

west config manifest.project-filter -- +sof
west update

west build -b intel_adsp_ace20_lnl modules/audio/sof/app/

ERROR: /soc/ssp@28100 POST_KERNEL 43 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@29100 POST_KERNEL 44 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2a100 POST_KERNEL 45 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2b100 POST_KERNEL 46 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2c100 POST_KERNEL 47 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2d100 POST_KERNEL 48 < /soc/dfpmccu@71b00/io0_domain  51

Also note a reviewer (@ceolin) expressed concerns about this unrelated change but it was ignored:

Using CONFIG_KERNEL_INIT_PRIORITY_DEFAULT here may be "bad" for some reason(s) and maybe it should be changed in the future, but it's nothing compared to breaking compilation of code that has been validated for months and been released in production
(https://github.com/thesofproject/sof-bin/releases/tag/v2023.09)

So the very urgent thing is to very quickly revert to the previous state to unblock development. Then we can discuss what is the better thing to do here.

This is a partial revert of one-line from commit 06cfbd4 ("drivers:
power_domain: Introduce a gpio monitor driver") which not just
introduced a new driver (no problem with that) but also changed the
initialization priority of another, unrelated and existing power domain
driver without even trying to compile it:

zephyrproject-rtos#61166 (comment)

```
west config manifest.project-filter -- +sof
west update

west build -b intel_adsp_ace20_lnl modules/audio/sof/app/

ERROR: /soc/ssp@28100 POST_KERNEL 43 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@29100 POST_KERNEL 44 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2a100 POST_KERNEL 45 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2b100 POST_KERNEL 46 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2c100 POST_KERNEL 47 < /soc/dfpmccu@71b00/io0_domain  51
ERROR: /soc/ssp@2d100 POST_KERNEL 48 < /soc/dfpmccu@71b00/io0_domain  51
```

Also note a reviewer (@ceolin) expressed concerns about this unrelated
change but it was ignored:
zephyrproject-rtos#61166 (comment)

Using `CONFIG_KERNEL_INIT_PRIORITY_DEFAULT` here may be "bad" for some
reason(s) and maybe it should be changed in the future, but it's nothing
compared to breaking _compilation_ of code that has been validated for
months and been released in production
(https://github.com/thesofproject/sof-bin/releases/tag/v2023.09)

So the very urgent thing is to very quickly revert to the previous state
to unblock development. Then we can discuss what is the better thing to
do here.

Signed-off-by: Marc Herbert <[email protected]>
@marc-hb marc-hb marked this pull request as ready for review November 2, 2023 00:56
@marc-hb marc-hb requested a review from ceolin as a code owner November 2, 2023 00:56
@zephyrbot zephyrbot added area: Power Management Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels Nov 2, 2023
@marc-hb marc-hb added bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug platform: Intel ADSP Intel Audio platforms labels Nov 2, 2023
@marc-hb
Copy link
Collaborator Author

marc-hb commented Nov 2, 2023

@fabiobaltieri fabiobaltieri merged commit c73e670 into zephyrproject-rtos:main Nov 2, 2023
28 checks passed
@fabiobaltieri
Copy link
Member

but also changed the initialization priority of another, unrelated and existing power domain driver without even trying to compile it:

The change should have had a standalone commit, but the more important things:

Is this a case of the "Intel Platforms (Xtensa)" maintainer area missing an entry for drivers/*/*intel_adsp*?

@marc-hb marc-hb deleted the revert-adsp-powerdomain2 branch November 2, 2023 16:23
@marc-hb
Copy link
Collaborator Author

marc-hb commented Nov 2, 2023

the CI should have caught it

As just mentioned, fix already submitted in:

someone from sof should have been cc'd once the PR got uploaded with a change to that file

True, maybe the filepath matching needs some fine-tuning. This being said:

  • Github's notification system is way too spammy (for instance no "cooldown", please upvote https://github.com/orgs/community/discussions/12504) so that PR could have been missed anyway.
  • Especially likely to be missed considering the PR was not about audio. It only had a small audio change sneaked in.
  • @ceolin did note the issue yet his review comment was missed.

It's quite subjective of course but for me the main cause was not in the lack of code reviews (which did not help) but in submitting a line change that was not even compile-tested. No one can be expected to buy hardware to test changes but I think compilation of changed code is a fair requirement! I always insert garbage temporarily in modified code to make sure I'm actually compiling my changes. The best way to test something is always to break it first, otherwise it's very common with Kconfig explosion and others to accidentally not test anything (example: missing thesofproject/sof#8429!). As another example: error handling is almost never tested.

cc: @semihalf-jakiela-albert

@fabiobaltieri
Copy link
Member

It's quite subjective of course but for me the main cause was not in the lack of code reviews (which did not help) but in submitting a line change that was not even compile-tested.

Yeah, what I mean is that the CI should try and build every file that has been modified, but it didn't. The whole build time priority check thing was meant to block these at CI build time so they don't get through in any case. I'm not familiar with the test plan generation and why it did not hit any cavs platforms for the change, but I think it should have, @nashif is that something you could look into?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Nov 2, 2023

@fabiobaltieri
Copy link
Member

fabiobaltieri commented Nov 2, 2023

@marc-hb oh, sorry I see what you mean now, I saw it was in the sof repo and thought it was downstream only, forgot that it has tests that are run in the upstream CI, thanks for persisting :-)

@marc-hb
Copy link
Collaborator Author

marc-hb commented Nov 2, 2023

To be honest I'm not sure this twister file belongs to the SOF repo :-) It was moved with all the rest which does belong to the SOF repo:

@fabiobaltieri
Copy link
Member

No idea, I see a tests/boards/intel_adsp/ssp still in the main repo but it seems to be limited to intel_adsp_cavs25, besides that nothing seems to be enabling CONFIG_DAI, but I guess it's fine if the module test runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Power Management bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms priority: high High impact/importance bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants