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

[Depends on 62522] zephyr: cavs: add secondary core context save support #8185

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/platform/intel/cavs/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ int platform_boot_complete(uint32_t boot_message)
return 0;
}

static struct pm_notifier pm_state_notifier = {
.state_exit = cpu_notify_state_exit,
};

/* Runs on the primary core only */
int platform_init(struct sof *sof)
{
Expand Down Expand Up @@ -150,6 +154,9 @@ int platform_init(struct sof *sof)
if (ret < 0)
return ret;

/* register power states exit notifiers */
pm_notifier_register(&pm_state_notifier);

/* initialize the host IPC mechanisms */
trace_point(TRACE_BOOT_PLATFORM_IPC);
ipc_init(sof);
Expand Down
3 changes: 1 addition & 2 deletions zephyr/lib/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ int cpu_enable_core(int id)
* initialization. By reinitializing the idle thread, we would overwrite the kernel structs
* and the idle thread stack.
*/
if (!IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE) ||
pm_state_next_get(id)->state == PM_STATE_ACTIVE)
if (pm_state_next_get(id)->state == PM_STATE_ACTIVE)
RanderWang marked this conversation as resolved.
Show resolved Hide resolved
z_init_cpu(id);
#endif

Expand Down