-
Notifications
You must be signed in to change notification settings - Fork 349
lib: cpu: Check return value from platform_boot_complete #10326
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
lib: cpu: Check return value from platform_boot_complete #10326
Conversation
Add error handling for platform_boot_complete() during D3 exit to improve debugging capabilities. Previously, platform_boot_complete() could fail silently if the DSP entered D3 state with an invalid IPC driver state, making it difficult to identify the root cause of issues. This change captures the return value and triggers a panic with a clear error message when the function fails. This improvement makes debugging easier by explicitly indicating when the boot completion fails after resuming from D3, rather than allowing execution to continue with potential undefined behavior. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
There was a problem hiding this 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 adds error handling for platform_boot_complete() during D3 state exit to improve debugging capabilities. Previously, this function could fail silently, making it difficult to identify issues when the DSP resumed from D3 state with an invalid IPC driver state.
Key Changes:
- Added return value checking for
platform_boot_complete()call - Added error logging and panic trigger when boot completion fails
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| int ret = platform_boot_complete(0); | ||
|
|
||
| if (ret) { |
Copilot
AI
Oct 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The variable ret is declared inside a conditional block. Consider declaring it at the beginning of the function or the encompassing scope to improve code readability and maintain consistency with common C coding practices.
softwarecki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmleman can you check internal CI. Thanks !
Same as here: #10327 (comment) |
|
@lgirdwood internal CI issue has been resolved. |
Add error handling for platform_boot_complete() during D3 exit to improve debugging capabilities.
Previously, platform_boot_complete() could fail silently if the DSP entered D3 state with an invalid IPC driver state, making it difficult to identify the root cause of issues. This change captures the return value and triggers a panic with a clear error message when the function fails.
This improvement makes debugging easier by explicitly indicating when the boot completion fails after resuming from D3, rather than allowing execution to continue with potential undefined behavior.