-
Notifications
You must be signed in to change notification settings - Fork 339
platform: ace: notifying about idle thread readiness #7174
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
platform: ace: notifying about idle thread readiness #7174
Conversation
2d8cf4a
to
305785a
Compare
Can one of the admins verify this patch? |
305785a
to
affa6aa
Compare
@tmleman any update ? |
@lgirdwood I'm still waiting for the merge on the zephyr side |
Idle thread should be initialize only when core it booting for the first time. Doing this again would overwrite the kernel structs and the idle thread stack. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Informing the primary core that the Idle thread on secondary core is ready. During the D3 exit flow thread is not initialize again, but restored from previously saved context. This patch includes also zephyr version update to aba3b12e31 (total 15 commits). Changes related to intel_adsp contain refactor and fixes for ACE secondary cores power flows. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
affa6aa
to
69c559f
Compare
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.
Now I see in second commit this is related to state-save. This should be somehow conditional on the feature being used, given the generic code is used for all platform/vendors.
* and the idle thread stack. | ||
*/ | ||
if (pm_state_next_get(id)->state == PM_STATE_ACTIVE) | ||
z_init_cpu(id); |
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.
Given this is an open-coded of z_smp_start_cpu() (see comment above), I don't fully understand why we have a different implementation here, and if this is correct, why this is not needed in the Zephyr kernel/smp.c version. Wouldn't the same problem be there? Or is this specific to a configuration where state is saved to persistant memory? If yes, this would need to be ifdef'ed out so this applies only to applicable platforms.
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.
I don't know how zephyr is handling it but right now it's not working properly. After secondary core exits D3 it will repeat the path that led him to this state. Power will not be shut off so eventually it will return to the Idle state but this is not correct behavior. Maybe zephyr doesn't support situation in which each core can be turned off and on multiple times.
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.
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.
We need to file a ticket to follow-up the change, but otherwise PR can proceed (and is potentially a blocker to update Zephyr baseline now).
Usual PM fail in https://sof-ci.01.org/sofpr/PR7174/build6662/devicetest/index.html (but passes on at least one device) and https://sof-ci.01.org/sofpr/PR7174/build6663/devicetest/index.html has one fail on system PM. Proceeding with the fix. Thanks @tmleman for filing the issue. |
Informing the primary core that the Idle thread on secondary core is ready. During the D3 exit flow thread is not initialize again, but restored from previously saved context.
Requires: