platform: intel: cavs: modify pm_notifier init for older toolchains#10283
Merged
kv2019i merged 1 commit intothesofproject:mainfrom Oct 8, 2025
Merged
platform: intel: cavs: modify pm_notifier init for older toolchains#10283kv2019i merged 1 commit intothesofproject:mainfrom
kv2019i merged 1 commit intothesofproject:mainfrom
Conversation
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>
There was a problem hiding this comment.
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.
Collaborator
Author
lyakh
approved these changes
Oct 7, 2025
Collaborator
lyakh
left a comment
There was a problem hiding this comment.
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.
abonislawski
approved these changes
Oct 8, 2025
tmleman
approved these changes
Oct 8, 2025
Contributor
tmleman
left a comment
There was a problem hiding this comment.
Let's merge this separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.