From fb03b491c7cb24a4d02a44c8c7e3182ce7a5b55d Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 25 Sep 2026 17:05:34 +0200 Subject: [PATCH 01/11] notifier: Remove an unused notifier_register() argument The "flags" argument of notifier_register() is unused, remove it. Signed-off-by: Guennadi Liakhovetski (cherry picked from commit 98209533e6c4fc2a2bb908daa8db02dd91adc195) --- src/audio/copier/copier.c | 2 +- src/audio/dai-legacy.c | 6 ++---- src/audio/dai-zephyr.c | 3 +-- src/audio/host-legacy.c | 3 +-- src/audio/kpb.c | 2 +- src/drivers/dw/dma.c | 2 +- src/include/sof/lib/notifier.h | 6 +----- src/lib/notifier.c | 16 ++-------------- src/schedule/dma_single_chan_domain.c | 3 +-- src/schedule/ll_schedule_xtos.c | 3 +-- test/cmocka/src/notifier_mocks.c | 2 +- 11 files changed, 13 insertions(+), 35 deletions(-) diff --git a/src/audio/copier/copier.c b/src/audio/copier/copier.c index 2375b540b493..ae7e9852b4d1 100644 --- a/src/audio/copier/copier.c +++ b/src/audio/copier/copier.c @@ -108,7 +108,7 @@ static int mic_privacy_configure(struct processing_module *mod, struct copier_da cd->mic_priv = mic_priv_data; ret = notifier_register(cd->mic_priv, NULL, NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE, - mic_privacy_event, 0); + mic_privacy_event); if (ret != 0) mod_free(mod, mic_priv_data); diff --git a/src/audio/dai-legacy.c b/src/audio/dai-legacy.c index 49fb8e011ffd..73f8704de36c 100644 --- a/src/audio/dai-legacy.c +++ b/src/audio/dai-legacy.c @@ -79,8 +79,7 @@ int dai_assign_group(struct dai_data *dd, struct comp_dev *dev, uint32_t group_i group_id, dd->group->num_dais); /* Register for the atomic trigger event */ - notifier_register(dev, dd->group, NOTIFIER_ID_DAI_TRIGGER, - dai_atomic_trigger, 0); + notifier_register(dev, dd->group, NOTIFIER_ID_DAI_TRIGGER, dai_atomic_trigger); return 0; } @@ -635,8 +634,7 @@ int dai_common_config_prepare(struct dai_data *dd, struct comp_dev *dev) dd->chan->index); /* setup callback */ - notifier_register(dev, dd->chan, NOTIFIER_ID_DMA_COPY, - dai_dma_cb, 0); + notifier_register(dev, dd->chan, NOTIFIER_ID_DMA_COPY, dai_dma_cb); return 0; } diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index 9f4e5dc57295..63c69648a0a5 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -103,8 +103,7 @@ __cold int dai_assign_group(struct dai_data *dd, struct comp_dev *dev, uint32_t group_id, dd->group->num_dais); /* Register for the atomic trigger event */ - notifier_register(dev, dd->group, NOTIFIER_ID_DAI_TRIGGER, - dai_atomic_trigger, 0); + notifier_register(dev, dd->group, NOTIFIER_ID_DAI_TRIGGER, dai_atomic_trigger); return 0; } diff --git a/src/audio/host-legacy.c b/src/audio/host-legacy.c index 591b5438f256..d3882931780c 100644 --- a/src/audio/host-legacy.c +++ b/src/audio/host-legacy.c @@ -876,8 +876,7 @@ int host_common_params(struct host_data *hd, struct comp_dev *dev, if (err >= 0) /* set up callback */ - notifier_register(dev, hd->chan, NOTIFIER_ID_DMA_COPY, - cb ? : host_dma_cb, 0); + notifier_register(dev, hd->chan, NOTIFIER_ID_DMA_COPY, cb ? : host_dma_cb); return err; } diff --git a/src/audio/kpb.c b/src/audio/kpb.c index 4e5049919baf..47a390780e71 100644 --- a/src/audio/kpb.c +++ b/src/audio/kpb.c @@ -877,7 +877,7 @@ static int kpb_prepare(struct comp_dev *dev) #else /* Register KPB for notification */ ret = notifier_register(dev, NULL, NOTIFIER_ID_KPB_CLIENT_EVT, - kpb_event_handler, 0); + kpb_event_handler); #endif /* CONFIG_AMS */ if (ret < 0) { diff --git a/src/drivers/dw/dma.c b/src/drivers/dw/dma.c index 005980454798..ce90963ac714 100644 --- a/src/drivers/dw/dma.c +++ b/src/drivers/dw/dma.c @@ -205,7 +205,7 @@ static struct dma_chan_data *dw_dma_channel_get(struct dma *dma, atomic_add(&dma->num_channels_busy, 1); #if !CONFIG_DMA_HW_LLI notifier_register(&dma->chan[i], &dma->chan[i], - NOTIFIER_ID_DMA_IRQ, dw_dma_chan_reload_lli_cb, 0); + NOTIFIER_ID_DMA_IRQ, dw_dma_chan_reload_lli_cb); #endif /* return channel */ diff --git a/src/include/sof/lib/notifier.h b/src/include/sof/lib/notifier.h index f022b805144c..c6b33ae46a97 100644 --- a/src/include/sof/lib/notifier.h +++ b/src/include/sof/lib/notifier.h @@ -19,9 +19,6 @@ #define NOTIFIER_TARGET_CORE_LOCAL NOTIFIER_TARGET_CORE_MASK(cpu_get_id()) #define NOTIFIER_TARGET_CORE_ALL_MASK 0xFFFFFFFF -/** \brief Notifier flags. */ -#define NOTIFIER_FLAG_AGGREGATE BIT(0) - enum notify_id { NOTIFIER_ID_CPU_FREQ = 0, /* struct clock_notify_data * */ NOTIFIER_ID_SSP_FREQ, /* struct clock_notify_data * */ @@ -71,10 +68,9 @@ typedef void (*notifier_callback_t)(void *receiver_data, enum notify_id event_ty * some specific notifier_event() calls when not NULL. * @param event_type list of callbacks to be added to * @param callback callback function - * @param flags see NOTIFIER_FLAG_* above */ int notifier_register(void *receiver_data, void *caller_id_filter, enum notify_id event_type, - notifier_callback_t callback, uint32_t flags); + notifier_callback_t callback); /** Unregister all callbacks matching that arguments tuple. NULL acts * as a wildcard. diff --git a/src/lib/notifier.c b/src/lib/notifier.c index 20770bd828a2..cd18a84c482f 100644 --- a/src/lib/notifier.c +++ b/src/lib/notifier.c @@ -37,8 +37,7 @@ struct callback_handle { }; int notifier_register(void *receiver, void *caller, enum notify_id type, - void (*cb)(void *arg, enum notify_id type, void *data), - uint32_t flags) + void (*cb)(void *arg, enum notify_id type, void *data)) { struct notify *notify = *arch_notify_get(); struct callback_handle *handle; @@ -49,18 +48,7 @@ int notifier_register(void *receiver, void *caller, enum notify_id type, key = k_spin_lock(¬ify->lock); - /* Find already registered event of this type */ - if (flags & NOTIFIER_FLAG_AGGREGATE && - !list_is_empty(¬ify->list[type])) { - handle = container_of((¬ify->list[type])->next, - struct callback_handle, list); - handle->num_registrations++; - - goto out; - } - - handle = rzalloc(SOF_MEM_FLAG_USER, - sizeof(*handle)); + handle = rzalloc(SOF_MEM_FLAG_USER, sizeof(*handle)); if (!handle) { tr_err(&nt_tr, "callback handle allocation failed."); diff --git a/src/schedule/dma_single_chan_domain.c b/src/schedule/dma_single_chan_domain.c index d234c473586a..a2a5d5bdb059 100644 --- a/src/schedule/dma_single_chan_domain.c +++ b/src/schedule/dma_single_chan_domain.c @@ -246,8 +246,7 @@ static int dma_single_chan_domain_register(struct ll_schedule_domain *domain, /* register for source change notifications */ if (register_needed) - notifier_register(domain, NULL, NOTIFIER_ID_DMA_DOMAIN_CHANGE, - dma_domain_changed, 0); + notifier_register(domain, NULL, NOTIFIER_ID_DMA_DOMAIN_CHANGE, dma_domain_changed); dma_domain->owner = channel->core; diff --git a/src/schedule/ll_schedule_xtos.c b/src/schedule/ll_schedule_xtos.c index 704a680e144d..cf16c87e14e5 100644 --- a/src/schedule/ll_schedule_xtos.c +++ b/src/schedule/ll_schedule_xtos.c @@ -795,8 +795,7 @@ int scheduler_init_ll(struct ll_schedule_domain *domain) sch->domain = domain; /* notification of clock changes */ - notifier_register(sch, NULL, NOTIFIER_CLK_CHANGE_ID(domain->clk), - ll_scheduler_notify, 0); + notifier_register(sch, NULL, NOTIFIER_CLK_CHANGE_ID(domain->clk), ll_scheduler_notify); scheduler_init(domain->type, &schedule_ll_ops, sch); diff --git a/test/cmocka/src/notifier_mocks.c b/test/cmocka/src/notifier_mocks.c index bfdb0d488ffe..b5a000fb2e40 100644 --- a/test/cmocka/src/notifier_mocks.c +++ b/test/cmocka/src/notifier_mocks.c @@ -50,7 +50,7 @@ void notifier_event(const void *caller, enum notify_id type, uint32_t core_mask, } int notifier_register(void *receiver, void *caller, enum notify_id type, - void (*cb)(void *arg, enum notify_id type, void *data), uint32_t flags) + void (*cb)(void *arg, enum notify_id type, void *data)) { struct notify *notify = *arch_notify_get(); struct callback_handle *handle; From 7f7b2c8b5562de48be9ff4d59000d018abb0ecd4 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 14 Oct 2026 17:26:40 +0100 Subject: [PATCH 02/11] audio: pipeline: log component ID when comp_prepare fails When comp_prepare() returns a negative error code in pipeline_comp_prepare(), emit a pipe_err message including the component ID and error code. This greatly accelerates diagnosing topology and IPC parameter configuration failures during pipeline setup. Co-developed-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Signed-off-by: Liam Girdwood --- src/audio/pipeline/pipeline-params.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/audio/pipeline/pipeline-params.c b/src/audio/pipeline/pipeline-params.c index ed32fc9e3b02..9c276d26fa65 100644 --- a/src/audio/pipeline/pipeline-params.c +++ b/src/audio/pipeline/pipeline-params.c @@ -283,8 +283,13 @@ static int pipeline_comp_prepare(struct comp_dev *current, } err = comp_prepare(current); - if (err < 0 || err == PPL_STATUS_PATH_STOP) + if (err < 0 || err == PPL_STATUS_PATH_STOP) { + if (err < 0) { + pipe_err(current->pipeline, "comp_prepare for comp 0x%x failed %d", + dev_comp_id(current), err); + } return err; + } return pipeline_for_each_comp(current, ctx, dir); } From e16dde562ffdc9435cdede22190a133ab2ef89b1 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 14 Oct 2026 17:26:29 +0100 Subject: [PATCH 03/11] audio: copier: guard against NULL pointers in copier_dai_free In copier_dai_free(), guard cd->dd[i] against NULL before accessing cd->dd[i]->gain_data and calling dai_common_free(). This prevents a NULL pointer dereference if endpoint allocation failed during initialization or during teardown of partially configured copier instances. Also reset pointers to NULL after freeing. Co-developed-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Signed-off-by: Liam Girdwood --- src/audio/copier/copier_dai.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/audio/copier/copier_dai.c b/src/audio/copier/copier_dai.c index 0e54c0c7a9e5..321d22654b40 100644 --- a/src/audio/copier/copier_dai.c +++ b/src/audio/copier/copier_dai.c @@ -415,13 +415,21 @@ __cold void copier_dai_free(struct processing_module *mod) assert_can_be_cold(); for (int i = 0; i < cd->endpoint_num; i++) { - dai_common_free(cd->dd[i]); - mod_free(mod, cd->dd[i]->gain_data); - mod_free(mod, cd->dd[i]); + if (cd->dd[i]) { + if (cd->dd[i]->gain_data) { + mod_free(mod, cd->dd[i]->gain_data); + cd->dd[i]->gain_data = NULL; + } + dai_common_free(cd->dd[i]); + mod_free(mod, cd->dd[i]); + cd->dd[i] = NULL; + } } /* only dai have multi endpoint case */ - if (cd->multi_endpoint_buffer) + if (cd->multi_endpoint_buffer) { buffer_free(cd->multi_endpoint_buffer); + cd->multi_endpoint_buffer = NULL; + } } int copier_dai_prepare(struct comp_dev *dev, struct copier_data *cd) From b947fe5152338f4552eb42df6024ba4c035cae46 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 28 Oct 2026 11:49:34 +0000 Subject: [PATCH 04/11] audio: dai: guard against NULL pointers during pipeline teardown In dai_common_free() and dai_free(), guard dd, dd->dai, dd->dma, and dd->dai_spec_config against NULL before dereferencing or releasing channels, and reset pointers to NULL after freeing. Also add NULL pointer guards to dai_put() and sof_dma_put(). This prevents NULL pointer dereferences and duplicate frees during teardown of partially configured or failed DAI pipelines. Co-developed-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Signed-off-by: Liam Girdwood --- src/audio/dai-zephyr.c | 30 +++++++++++++++++++++++++----- src/lib/dai.c | 6 ++++++ src/lib/dma.c | 3 +++ 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index 63c69648a0a5..c86d57cdb77f 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -681,25 +681,40 @@ __cold void dai_common_free(struct dai_data *dd) { assert_can_be_cold(); + if (!dd) + return; + #ifdef CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS io_perf_monitor_release_slot(dd->io_perf_dai_byte_count); #endif - if (dd->group) + if (dd->group) { dai_group_put(dd->group); + dd->group = NULL; + } if (dd->chan_index >= 0) { - sof_dma_release_channel(dd->dma, dd->chan_index); + if (dd->dma) + sof_dma_release_channel(dd->dma, dd->chan_index); dd->chan_index = -EINVAL; } - sof_dma_put(dd->dma); + if (dd->dma) { + sof_dma_put(dd->dma); + dd->dma = NULL; + } dai_release_llp_slot(dd); - dai_put(dd->dai); + if (dd->dai) { + dai_put(dd->dai); + dd->dai = NULL; + } - sof_heap_free(dd->alloc_ctx.heap, dd->dai_spec_config); + if (dd->dai_spec_config) { + sof_heap_free(dd->alloc_ctx.heap, dd->dai_spec_config); + dd->dai_spec_config = NULL; + } } __cold static void dai_free(struct comp_dev *dev) @@ -708,6 +723,11 @@ __cold static void dai_free(struct comp_dev *dev) assert_can_be_cold(); + if (!dd) { + comp_free_device(dev); + return; + } + if (dd->group) notifier_unregister(dev, dd->group, NOTIFIER_ID_DAI_TRIGGER); diff --git a/src/lib/dai.c b/src/lib/dai.c index 68163282adc1..0185bc6d435e 100644 --- a/src/lib/dai.c +++ b/src/lib/dai.c @@ -375,6 +375,9 @@ void dai_put(struct dai *dai) int ret; struct k_heap *heap = NULL; + if (!dai) + return; + #ifdef CONFIG_SOF_USERSPACE_LL heap = zephyr_ll_user_heap(); #endif @@ -443,6 +446,9 @@ void dai_put(struct dai *dai) int ret; k_spinlock_key_t key; + if (!dai) + return; + key = k_spin_lock(&dai->lock); if (--dai->sref == 0) { ret = dai_remove(dai); diff --git a/src/lib/dma.c b/src/lib/dma.c index 6500e7557483..78a9a6d327b8 100644 --- a/src/lib/dma.c +++ b/src/lib/dma.c @@ -133,6 +133,9 @@ void z_impl_sof_dma_put(struct sof_dma *dma) { k_spinlock_key_t key; + if (!dma) + return; + key = k_spin_lock(&dma->lock); if (--dma->sref == 0) { sof_heap_free(dma->heap, dma->chan); From 56ddef1816b34a34e7df09167973fec1d81290c5 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 28 Oct 2026 11:49:28 +0000 Subject: [PATCH 05/11] lib: agent: guard against NULL system agent in sa_set_panic_on_delay When pipelines are cancelled via pipeline_schedule_cancel() during pause or stop triggers, sa_set_panic_on_delay() is called to enable panic on delay. In host testbench and library builds, the system agent timer is not initialized, leaving the sa pointer NULL. Add a NULL check in sa_set_panic_on_delay() before dereferencing the sa pointer so host testbench runs do not crash with a segmentation fault. Signed-off-by: Seppo Ingalsuo --- src/include/sof/lib/agent.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/include/sof/lib/agent.h b/src/include/sof/lib/agent.h index 6e70a4ce997d..dcd007d6f841 100644 --- a/src/include/sof/lib/agent.h +++ b/src/include/sof/lib/agent.h @@ -42,6 +42,9 @@ static inline void sa_set_panic_on_delay(bool enabled) { struct sa *sa = sof_get()->sa; + if (!sa) + return; + if (enabled) atomic_add(&sa->panic_cnt, 1); else From f79a2fab72e7d1d0d41a2cebc5f28dc601974589 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 28 Oct 2026 11:49:31 +0000 Subject: [PATCH 06/11] audio: host-zephyr: increase minimum no-bytes warning interval When a capture stream is starved or waiting for detection audio, logging every 20 ms floods the trace buffer and causes diagnostic log messages to be dropped. Increase SOF_MIN_NO_BYTES_INTERVAL_MS from 20 ms to 1000 ms so that trace transport bandwidth is conserved during idle capture periods. Signed-off-by: Seppo Ingalsuo --- src/audio/host-zephyr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/host-zephyr.c b/src/audio/host-zephyr.c index 5038bcc78320..a46ee5e44485 100644 --- a/src/audio/host-zephyr.c +++ b/src/audio/host-zephyr.c @@ -388,7 +388,7 @@ static int host_get_status(struct comp_dev *dev, struct host_data *hd, struct dm } /* Minimum time between 2 consecutive "no bytes to copy" messages in milliseconds */ -#define SOF_MIN_NO_BYTES_INTERVAL_MS 20 +#define SOF_MIN_NO_BYTES_INTERVAL_MS 1000 static inline bool host_handle_eos(struct host_data *hd, struct comp_dev *dev, uint32_t avail_samples) From a0a2ce7639afffca613e662dc773ec114ce1c867 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 14 Oct 2026 17:26:17 +0100 Subject: [PATCH 07/11] schedule: edf_schedule: cancel delayed work on task free When freeing an EDF scheduled task, ensure any pending delayed work associated with the task is cancelled before marking the task free and clearing callbacks. This prevents delayed work from triggering on freed task data during pipeline resets or teardown. Co-developed-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Signed-off-by: Liam Girdwood --- zephyr/edf_schedule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zephyr/edf_schedule.c b/zephyr/edf_schedule.c index f00ad28b217a..c418b73e92e1 100644 --- a/zephyr/edf_schedule.c +++ b/zephyr/edf_schedule.c @@ -86,6 +86,7 @@ static int schedule_edf_task_running(void *data, struct task *task) static int schedule_edf_task_free(void *data, struct task *task) { + k_work_cancel_delayable(&task->z_delayed_work); task->state = SOF_TASK_STATE_FREE; task->ops.run = NULL; task->data = NULL; From e29f107fc817f18829bb3e37cf88cfc5eb31f436 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 9 Oct 2026 21:56:45 +0100 Subject: [PATCH 08/11] platform: intel: cavs: initialize the DP scheduler CONFIG_ZEPHYR_DP_SCHEDULER can be enabled on cAVS, but only the ACE platform_init() registered the DP scheduler. Creating a DP module on cAVS then failed with "unable to bind scheduler to task (type 3)" and module init returned -ENODEV. Call scheduler_dp_init() after the LL scheduler is set up, as ACE does. Co-developed-by: Liam Girdwood Signed-off-by: Liam Girdwood Signed-off-by: Peter Ujfalusi --- src/platform/intel/cavs/platform.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/platform/intel/cavs/platform.c b/src/platform/intel/cavs/platform.c index 8a1a7c59c3b5..4c386ac7a55c 100644 --- a/src/platform/intel/cavs/platform.c +++ b/src/platform/intel/cavs/platform.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -122,6 +123,12 @@ int platform_init(struct sof *sof) sof->platform_timer_domain = timer_domain_init(sof->platform_timer, 0); scheduler_init_ll(sof->platform_timer_domain); +#if CONFIG_ZEPHYR_DP_SCHEDULER + ret = scheduler_dp_init(); + if (ret < 0) + return ret; +#endif + /* init the system agent */ trace_point(TRACE_BOOT_PLATFORM_AGENT); sa_init(sof, CONFIG_SYSTICK_PERIOD); From 012401d49f99e04c5a23b87eddf88a430ae7cdf8 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 9 Oct 2026 21:56:45 +0100 Subject: [PATCH 09/11] schedule: zephyr_dp_schedule: use a mutex for the per-core DP lock The DP lock is taken by the LL thread on every tick in scheduler_dp_ll_tick() and by each DP thread after every run. It was a k_sem, which has no priority inheritance: when a DP thread holding it was preempted by other DP threads, the cooperative high priority LL thread blocked until the holder got CPU time again. With several busy DP modules (3 MFCC + 3 MWW on cAVS 2.5) single LL ticks took up to ~40 ms, overrunning the DMIC DMAs of unrelated streams. With a k_mutex the holder inherits the LL priority: LL max drops from ~1.5M to <30k timer cycles, with no LL overruns or DMA xruns. Co-developed-by: Liam Girdwood Signed-off-by: Liam Girdwood Signed-off-by: Peter Ujfalusi --- src/schedule/zephyr_dp_schedule.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/schedule/zephyr_dp_schedule.c b/src/schedule/zephyr_dp_schedule.c index faa9d603c153..0bcc8e45fed2 100644 --- a/src/schedule/zephyr_dp_schedule.c +++ b/src/schedule/zephyr_dp_schedule.c @@ -35,7 +35,8 @@ SOF_DEFINE_REG_UUID(dp_sched); DECLARE_TR_CTX(dp_tr, SOF_UUID(dp_sched_uuid), LOG_LEVEL_INFO); -#define DP_LOCK_INIT(i, _) Z_SEM_INITIALIZER(dp_lock[i], 1, 1) +/* k_mutex, not k_sem: priority inheritance keeps a preempted DP holder from stalling LL */ +#define DP_LOCK_INIT(i, _) Z_MUTEX_INITIALIZER(dp_lock[i]) #define DP_LOCK_INIT_LIST LISTIFY(CONFIG_MP_MAX_NUM_CPUS, DP_LOCK_INIT, (,)) /* User threads don't need access to this array. Access is performed from @@ -43,7 +44,7 @@ DECLARE_TR_CTX(dp_tr, SOF_UUID(dp_sched_uuid), LOG_LEVEL_INFO); * to be qualified as initialized by the gen_kobject_list.py script. */ static -STRUCT_SECTION_ITERABLE_ARRAY(k_sem, dp_lock, CONFIG_MP_MAX_NUM_CPUS) = { DP_LOCK_INIT_LIST }; +STRUCT_SECTION_ITERABLE_ARRAY(k_mutex, dp_lock, CONFIG_MP_MAX_NUM_CPUS) = { DP_LOCK_INIT_LIST }; /* Each per-core instance of DP scheduler has separate structures; hence, locks are per-core. * @@ -51,13 +52,13 @@ STRUCT_SECTION_ITERABLE_ARRAY(k_sem, dp_lock, CONFIG_MP_MAX_NUM_CPUS) = { DP_LOC */ unsigned int scheduler_dp_lock(uint16_t core) { - k_sem_take(&dp_lock[core], K_FOREVER); + k_mutex_lock(&dp_lock[core], K_FOREVER); return core; } void scheduler_dp_unlock(unsigned int key) { - k_sem_give(&dp_lock[key]); + k_mutex_unlock(&dp_lock[key]); } void scheduler_dp_grant(k_tid_t thread_id, uint16_t core) From 7b4c8ea6b5cf015e16f3b33c005bcd75910b97a1 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 3 Nov 2026 11:16:28 +0200 Subject: [PATCH 10/11] debug_stream: text_msg: include header for EXPORT_SYMBOL EXPORT_SYMBOL() is defined in zephyr/llext/symbol.h. Without LLEXT nothing includes it indirectly, so a static build with the debug stream text messages fails. Include the header directly; the macro is a no-op when LLEXT is disabled. Signed-off-by: Seppo Ingalsuo --- src/debug/debug_stream/debug_stream_text_msg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/debug/debug_stream/debug_stream_text_msg.c b/src/debug/debug_stream/debug_stream_text_msg.c index f4b67d4d307a..17d3b82d2d37 100644 --- a/src/debug/debug_stream/debug_stream_text_msg.c +++ b/src/debug/debug_stream/debug_stream_text_msg.c @@ -10,6 +10,7 @@ #include #include #include +#include #include From 8d7ebf145c114b9ad76c932e3d72521f17fcff3f Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Fri, 9 Oct 2026 21:56:45 +0100 Subject: [PATCH 11/11] tools: sof_ri_info: add Intel debug key signature mapping for Panther Lake Add Panther Lake ACE 3.0 Intel OTC debug key modulus and exponent mapping in sof_ri_info.py to support manifest and signature decoding on PTL binaries. Co-developed-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Signed-off-by: Liam Girdwood --- tools/sof_ri_info/sof_ri_info.py | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tools/sof_ri_info/sof_ri_info.py b/tools/sof_ri_info/sof_ri_info.py index 5fca3a42a3be..7999de11c177 100755 --- a/tools/sof_ri_info/sof_ri_info.py +++ b/tools/sof_ri_info/sof_ri_info.py @@ -639,6 +639,56 @@ 0x63, 0x04, 0xaf, 0x24, 0x45, 0x87, 0xf4, 0x96, 0x55, 0xd1, 0x7d, 0xc6, 0x0d, 0x79, 0x12, 0xa9]) +PTL_INTEL_DEBUG_KEY = bytes([ + 0x65, 0x24, 0xe8, 0x0a, 0x41, 0xc8, 0xed, 0xa2, + 0x92, 0x59, 0x20, 0x13, 0x3f, 0xcd, 0x11, 0x8b, + 0x7e, 0xdb, 0x8d, 0xf5, 0x69, 0xd9, 0x36, 0x2c, + 0x6c, 0x34, 0xba, 0xec, 0xce, 0x3e, 0xcb, 0xaa, + 0x52, 0x58, 0xef, 0x6b, 0x92, 0xe7, 0x8f, 0x8b, + 0x36, 0x8b, 0xa0, 0xc4, 0x61, 0x62, 0x13, 0x8c, + 0xcc, 0x2a, 0x75, 0xab, 0x59, 0xab, 0xf0, 0xf1, + 0x28, 0xd7, 0xdc, 0x42, 0xa8, 0xb1, 0xa0, 0x1f, + 0x95, 0x02, 0xaa, 0x30, 0x41, 0xe3, 0x9d, 0xf5, + 0x0c, 0x74, 0x3b, 0x72, 0x22, 0x98, 0x45, 0x50, + 0xec, 0x09, 0x04, 0x45, 0x22, 0x62, 0xc1, 0xce, + 0xb6, 0x4d, 0x1b, 0xac, 0xe2, 0xa2, 0xf1, 0x62, + 0x25, 0x60, 0xc0, 0x12, 0x08, 0x7a, 0x4e, 0x11, + 0x18, 0x81, 0xc8, 0xf6, 0xfa, 0xb0, 0x76, 0x7e, + 0xeb, 0x1c, 0xc3, 0x00, 0xf3, 0x1d, 0x5e, 0xc3, + 0x9c, 0x89, 0x74, 0xad, 0x17, 0xa8, 0x0a, 0x7e, + 0x33, 0xa4, 0x46, 0x1d, 0xcd, 0xac, 0xe2, 0xb2, + 0x34, 0xc2, 0x53, 0x03, 0x72, 0x18, 0x49, 0x22, + 0x9f, 0x51, 0xac, 0x65, 0x79, 0xf7, 0x02, 0x0f, + 0xea, 0xfd, 0x33, 0x5f, 0x3c, 0x7a, 0x0e, 0xd0, + 0x71, 0x85, 0x76, 0xcd, 0x7e, 0x3e, 0x85, 0xa4, + 0xc9, 0x88, 0x7d, 0xb8, 0x68, 0x00, 0xe1, 0x49, + 0xc4, 0x4f, 0xe7, 0xf4, 0x19, 0x1a, 0x88, 0xa2, + 0x89, 0xaa, 0xcc, 0xd6, 0xdd, 0x99, 0xfb, 0x54, + 0x89, 0x14, 0xe7, 0xc5, 0x4b, 0x43, 0x35, 0x50, + 0x77, 0xc8, 0xd6, 0x45, 0xd6, 0x09, 0xae, 0x31, + 0xa7, 0x30, 0x0b, 0xfa, 0xa5, 0x5d, 0xc0, 0x88, + 0x80, 0x50, 0xa5, 0x7f, 0x7c, 0xd7, 0xf6, 0x19, + 0x11, 0x49, 0xb1, 0x31, 0x6b, 0x23, 0x03, 0x82, + 0x6b, 0x42, 0x3a, 0x91, 0xd7, 0x86, 0x13, 0xa1, + 0xf0, 0x09, 0x95, 0xa4, 0xd1, 0xac, 0xd6, 0x3e, + 0xb3, 0x48, 0xe0, 0xc8, 0xdb, 0x4e, 0x91, 0xcb, + 0x1f, 0xd0, 0x5d, 0xec, 0x09, 0xb8, 0x5e, 0x8b, + 0xeb, 0x74, 0xf0, 0x2e, 0xa0, 0x98, 0x2c, 0x06, + 0x35, 0x85, 0xec, 0x6f, 0x8f, 0xfa, 0xb8, 0x0c, + 0x2a, 0x47, 0xc5, 0x4d, 0x15, 0xea, 0x7c, 0x04, + 0x96, 0x21, 0x41, 0x38, 0x1e, 0x3f, 0x7c, 0x96, + 0x61, 0x12, 0x5d, 0x50, 0x90, 0x18, 0x5e, 0xe6, + 0xd2, 0x30, 0x53, 0xdb, 0xc3, 0x0f, 0xef, 0x28, + 0xf6, 0x6f, 0xaf, 0x03, 0xc0, 0xca, 0x6b, 0x3b, + 0x4f, 0xa8, 0x82, 0xae, 0x4e, 0x0f, 0x9b, 0x08, + 0x8d, 0x8f, 0x43, 0xed, 0x48, 0x8e, 0xe6, 0xa1, + 0x7e, 0xb3, 0x2e, 0x37, 0x2e, 0x48, 0x95, 0xd4, + 0x1d, 0xa6, 0xfe, 0x22, 0x9f, 0x9a, 0x02, 0xa9, + 0xd9, 0xfc, 0x23, 0x71, 0x02, 0x48, 0x24, 0x6b, + 0xe7, 0xc1, 0x6c, 0x20, 0x9f, 0xdf, 0x8d, 0xc1, + 0x65, 0xe4, 0x34, 0xc3, 0x02, 0x33, 0x29, 0xe9, + 0x30, 0x32, 0xd1, 0x2f, 0xc4, 0xfd, 0x61, 0xca]) + KNOWN_KEYS = {APL_INTEL_PROD_KEY : 'APL Intel prod key', CNL_INTEL_PROD_KEY : 'CNL Intel prod key', ICL_INTEL_PROD_KEY : 'ICL Intel prod key', @@ -651,6 +701,7 @@ LNL_INTEL_PROD_KEY : 'LNL Intel prod key', ARL_S_INTEL_PROD_KEY : 'ARL-S Intel prod key', PTL_INTEL_PROD_KEY : 'PTL Intel prod key', + PTL_INTEL_DEBUG_KEY : 'PTL Intel debug key', COMMUNITY_KEY : 'Community key', COMMUNITY_KEY2 : 'Community 3k key'}