platform: mtk: Fix crash in DEBUG build on MTK platform#9947
platform: mtk: Fix crash in DEBUG build on MTK platform#9947lgirdwood merged 1 commit intothesofproject:mainfrom
Conversation
|
Can one of the admins verify this patch?
|
5d6cc52 to
d6286c8
Compare
src/schedule/zephyr_domain.c
Outdated
| struct zephyr_domain *zephyr_domain; | ||
|
|
||
| if (!ll_sch_dom) | ||
| return false; |
There was a problem hiding this comment.
this patch adds a few checks to a function that's called frequently, albeit on paths that shouldn't be time-critical. Still I'm curious how is it possible to get NULL in _schedulers[] array - you don't register schedulers on all cores?
There was a problem hiding this comment.
@andrew-mtk might be worth checking if this is being created correctly and not clobbered. This could be why its failing on your platform ?
There was a problem hiding this comment.
@lgirdwood, I did more tests and found that platform_init() for MTK platforms calls ipc_init() before scheduler_init_ll(). If I reverse the order, there is no crash.
|
What is a background of this change? Has it ever crashed at null at one of those points? |
Fix crash thesofproject#9933 in DEBUG build on MTK platform. ipc_init() must be called after scheduler_init_ll(). Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
d6286c8 to
7bdc785
Compare
Fix crash thesofproject#9933 in DEBUG build on MTK platform.
ipc_init() must be called after scheduler_init_ll().