Skip to content

Conversation

@kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Oct 6, 2025

With Zephyr commit ae1f13149fcd ("pm: Extend pm notifier to be able to report substate"), the pm_notifier struct was changed to include multiple structs within a union. The xcc toolchain used for cAVS targets cannot initialize the struct with the existing code.

Modify the code to work with the new pm.h definition and the old compiler used.

With Zephyr commit ae1f13149fcd ("pm: Extend pm notifier to be able to
report substate"), the pm_notifier struct was changed to include
multiple structs within a union. The xcc toolchain used for cAVS
targets cannot initialize the struct with the existing code.

Modify the code to work with the new pm.h definition and the old
compiler used.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Copilot AI review requested due to automatic review settings October 6, 2025 12:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses compatibility issues with the Zephyr pm_notifier struct changes for older xcc toolchains used in cAVS targets. The changes ensure the code works with both the updated pm.h definition and legacy compiler constraints.

  • Replaces static struct initialization with runtime initialization
  • Moves pm_notifier field assignment from declaration to runtime setup

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kv2019i
Copy link
Collaborator Author

kv2019i commented Oct 6, 2025

@tmleman This should fix #10268 . You can cherrypick to your PR and add it before the west update as this works with old Zephyr baseline version as well.

Copy link
Collaborator

@lyakh lyakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One would've thought any C-compiler should be able to parse any valid C-code by now, C isn't a particularly young language after all any more.

Copy link
Contributor

@tmleman tmleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge this separately.

@kv2019i kv2019i merged commit 400db36 into thesofproject:main Oct 8, 2025
37 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants