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

Revert "pm: Remove CURRENT_CPU macro" #68234

Closed

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Jan 29, 2024

This reverts commit b9d4b9d.

System resume fails every time with this patch on Intel ACE ADSP platform. Initial boot is ok, but system resume fails.

This reverts commit b9d4b9d.

System resume fails every time with this patch on Intel ACE
ADSP platform. Initial boot is ok, but system resume fails.

Signed-off-by: Kai Vehmanen <[email protected]>
Copy link
Member

@nashif nashif left a comment

Choose a reason for hiding this comment

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

i have seen some issues with this as well, lets revert and come up with a working fix.

@kv2019i
Copy link
Collaborator Author

kv2019i commented Jan 29, 2024

@ceolin I added some debug to the build and the

void pm_system_resume(void)
{
»       uint8_t id = CURRENT_CPU;
»       printk("DEBUG: id %d, z_smp_cpu_mobile:%d arch cpu %u\n", id, z_smp_cpu_mobile(), arch_curr_cpu());

Gives me

DEBUG: id 0, z_smp_cpu_mobile:1 arch cpu 1074840120

So it's the kernel_structs.h assert that fires:

#define _current_cpu ({ __ASSERT_NO_MSG(!z_smp_cpu_mobile()); \
»       »       »       arch_curr_cpu(); })

@ceolin
Copy link
Member

ceolin commented Jan 29, 2024

@nashif @kv2019i this is the proper fix #67863

That change just exposed an existent problem.

@kv2019i
Copy link
Collaborator Author

kv2019i commented Jan 30, 2024

@ceolin Confirmed #67863 fixes the issue, closing this revert as that one seems to be close to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants