Skip to content

zephyr: add notifier_register(ipc_send_queued_msg) in task_main_start() - #4428

Merged
lgirdwood merged 2 commits into
thesofproject:mainfrom
marc-hb:ipc-queue-zephyr
Jun 29, 2021
Merged

zephyr: add notifier_register(ipc_send_queued_msg) in task_main_start()#4428
lgirdwood merged 2 commits into
thesofproject:mainfrom
marc-hb:ipc-queue-zephyr

Conversation

@marc-hb

@marc-hbmarc-hb commented Jun 29, 2021

Copy link
Copy Markdown
Collaborator

Fixes the zephyr part of #4356

In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core(),
the initialization of which has a hard and circular dependency with the
initialization of the EDF scheduler. This EDF scheduler is not part of
Zephyr. Because of the circular dependency it does not seem
possible (nor desirable?) to refactor this code and make it compatible
with Zephyr. So schedule ipc_send_queued_msg() differently in Zephyr:
using a notifier triggered by the periodic Low Latency scheduler.

Signed-off-by: Marc Herbert marc.herbert@intel.com

Not related to this PR but if you're curious about NOTIFIER_ID_LL_POST_RUN find information in #4430

... and rename some parameter names.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixesthesofproject#4356
In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core(),
the initialization of which has a hard and circular dependency with the
initialization of the EDF scheduler. This EDF scheduler is not part of
Zephyr. Because of the circular dependency it does not seem
possible (nor desirable?) to refactor this code and make it compatible
with Zephyr. So schedule ipc_send_queued_msg() differently in Zephyr:
using a notifier triggered by the periodic Low Latency scheduler.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb

Copy link
Copy Markdown
CollaboratorAuthor

@marc-hb
marc-hb marked this pull request as ready for review June 29, 2021 16:55
Comment threadzephyr/wrapper.c
/* init pipeline position offsets */
pipeline_posn_init(sof);

(void)notifier_register(NULL, scheduler_get_data(SOF_SCHEDULE_LL_TIMER),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we have a comment here stating the long term solution so everyone knows this will be temporary. This can be another PR, feel free to create a feature for this too.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Submitted in PR #4441

@lgirdwood

Copy link
Copy Markdown
Member

Alsabat showing some DUT clock drift wrt testing PC.

@lgirdwood
lgirdwood merged commit c194125 into thesofproject:mainJun 29, 2021
@marc-hb
marc-hb deleted the ipc-queue-zephyr branch June 29, 2021 23:19
marc-hb added a commit to marc-hb/sof that referenced this pull request Jul 3, 2021
As requested in previous PR thesofproject#4428
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
lgirdwood pushed a commit that referenced this pull request Jul 7, 2021
As requested in previous PR #4428
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
ranj063 pushed a commit to ranj063/sof that referenced this pull request Jul 16, 2021
As requested in previous PR thesofproject#4428
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
lgirdwood pushed a commit that referenced this pull request Jul 16, 2021
As requested in previous PR #4428
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@marc-hb@lgirdwood