-
Notifications
You must be signed in to change notification settings - Fork 349
zephyr: correct the idc payload initialization #5512
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
zephyr: correct the idc payload initialization #5512
Conversation
|
Can one of the admins verify this patch?
|
|
Can one of the admins verify this patch? |
|
@rfredzim please check email - I've sent invite that will automatically run CI for you. I will manually run it now. |
|
test this please |
|
@kv2019i will need this for v2,1 final. |
|
test this please |
kv2019i
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.
One question inline.
bff48f7 to
9aade0c
Compare
kv2019i
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.
Thanks, good catch!
9aade0c to
4bc01fd
Compare
|
test this please |
1 similar comment
|
test this please |
|
@kv2019i @lyakh looks like we could have some cache issue as I cant see why the ZZ LL scheduler number of tasks would be a large negative. @rfredzim could you try adding this diff to your PR and see if it make any difference to the CI result. diff --git a/src/schedule/schedule.c b/src/schedule/schedule.c
index 543f91e21..651b53502 100644
--- a/src/schedule/schedule.c
+++ b/src/schedule/schedule.c
@@ -65,7 +65,7 @@ void scheduler_init(int type, const struct scheduler_ops *ops, void *data)
!ops->schedule_task_free)
return;
- sch = rzalloc(SOF_MEM_ZONE_SYS, 0, SOF_MEM_CAPS_RAM, sizeof(*sch));
+ sch = rzalloc(SOF_MEM_ZONE_SYS_SHARED, 0, SOF_MEM_CAPS_RAM, sizeof(*sch));
list_init(&sch->list);
sch->type = type;
sch->ops = ops; |
@lgirdwood actually I don't see how this can be a cache corruption:
But there seems to be another bug in that code: |
4bc01fd to
e1e4482
Compare
|
@lgirdwood & @lyakh, adding both changes to the PR:
Looks like some issues with edf_scheduler this time: Do you have any further advise on this? |
|
@rfredzim something odd is indeed going on. One thing I noticed is that the IDC payload data is an array of structures per core that are not cache aligned. diff --git a/src/include/sof/drivers/idc.h b/src/include/sof/drivers/idc.h
index 1c078b826..f4fbad072 100644
--- a/src/include/sof/drivers/idc.h
+++ b/src/include/sof/drivers/idc.h
@@ -96,7 +96,7 @@
#define iTS(x) (((x) >> IDC_TYPE_SHIFT) & IDC_TYPE_MASK)
/** \brief Max IDC message payload size in bytes. */
-#define IDC_MAX_PAYLOAD_SIZE 96
+#define IDC_MAX_PAYLOAD_SIZE (DCACHE_LINE_SIZE * 2)
/** \brief IDC free function flags */
#define IDC_FREE_IRQ_ONLY BIT(0) /**< disable only irqs */Can you try adding this to the PR and rerun the CI. |
For zephyr case remove the dynamic allocation of per-core idc elements since these are already statically allocated in a form of idc array in zephyr/wrapper.c. The payload pointer initialization need to use idc entries which are returned by the get_idc() call. Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
e1e4482 to
692cae9
Compare
|
@rfredzim ok, CI looks better - I will rerun to be sure. |
|
SOFCI TEST |
|
@rfredzim looks like we need a small patch to fix fuzzer and testbench build |
Rerun looks good. |
24d21c9 to
0a86d9e
Compare
Hi @lgirdwood I have pushed the cleanup of dcache aligned idc payload commit to this PR. BR, Rafal |
Yep, pls keep it in this PR and you can add my SOB. Thanks ! |
Modify IDC payload size to be cache aligned and have size of 2 cache lines. Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
0a86d9e to
3edb294
Compare
Done. After the CI is complete I think the PR should be ready to merge. |
|
SOFCI TEST |
|
License server timeout for xcc - rerun CI. |
|
SOFCI TEST |
|
Try CI again - could be a DUT issue as kernel logs are missing. |
|
SOFCI TEST |
Ack - CI good again (kernel logs are visible), but will rerun one more time to be sure. |
|
SOFCI TEST |
|
All green ! |



Remove the dynamic allocation of per-core idc elements since these
are already statically allocated in a form of idc array in zephyr/wrapper.c.
The payload pointer initialization need to use idc entries which are returned by
get_idc() call.
Signed-off-by: Rafal Redzimski rafal.f.redzimski@intel.com