Skip to content

Commit 77fded5

Browse files
tmlemankv2019i
authored andcommitted
west.yml: update zephyr to 217a5ac0ca46
Total of 1024 commits. Changes include: 19fa644e348c arch: xtensa: semihost: Account for NULL terminator in path length a53ab458d532 arch: xtensa: semihost: Add QEMU target support 9a8657193a2e arch: xtensa: semihost: Add simulator support 03263c5213a0 kernel: heap: add BLOCKING trace and fix EXIT ordering in k_heap_realloc 2f58de062669 kernel: stack: move BLOCKING trace to after K_NO_WAIT check in k_stack_pop 8dbe9770901a kernel: mailbox: emit tracing EXIT on async-send matched-receiver path d01ea12e787e kernel: queue: remove spurious BLOCKING trace in queue_insert 5ca3c912b29b kernel: userspace: Add k_object_access_revoke_others 24b75db466f6 llext: add CONFIG_LLEXT_CUSTOM_HEAP_PLACEMENT edcfe755ae87 logging: fix unaligned access in z_log_msg_enqueue 33d43d093371 xtensa: ptables: fix dangling memory domains 4d5f470290ae soc: arch: select SCHED_IPI_SUPPORTED if SMP 243012c33c97 kernel: move thread_entry from lib/os to kernel c60e0e943605 kernel: move userspace sem into kernel/sys b572cb23fc8b kernel: userspace: move mutex/user_work to userspace 85ca9bb992e2 kernel: move smp code into smp/ 974dbbf2c0f6 kernel: move userspace kconfigs into own file d8a1960c8bae kernel: reorg mem domain kconfig eb294b7a1eb9 kernel: move userspace code to own folder bac294c90f4c xtensa: remove mem_manage.c b72e6dcdba50 soc: intel_adsp/ace: add custom memory range check code d6d419264421 include: drivers: dai: Use DEVICE_API_GET eeb0a701f1e9 doc: dmic: improve main DMIC documentation page bd556f218bf8 scripts: runners: xtensa: ignore SIGINT while GDB is running e0c2585bebf1 include: drivers: i2s: Use DEVICE_API_GET Zephyr kernel Kconfig was restructured: SCHED_CPU_MASK and SCHED_CPU_MASK_PIN_ONLY were moved from kernel/Kconfig into kernel/smp/Kconfig inside an "if SMP" block (commits by Anas Nashif reorganizing kernel sources into kernel/smp/ and kernel/userspace/ subdirectories). This makes CONFIG_SCHED_CPU_MASK unavailable on non-SMP platforms (IMX, native_sim/fuzzers, LP64-WIP), causing k_thread_cpu_pin(), k_thread_cpu_mask_clear() and k_thread_cpu_mask_enable() to be undeclared. Fix: guard all k_thread_cpu_pin/k_thread_cpu_mask_* call sites with CONFIG_SCHED_CPU_MASK ifdef. On single-core platforms thread pinning is a no-op. Affected files: src/ipc/ipc-common.c (k_thread_cpu_pin) src/schedule/zephyr_twb_schedule.c (k_thread_cpu_pin) src/schedule/zephyr_dp_schedule_thread.c (k_thread_cpu_pin) src/schedule/zephyr_dp_schedule_application.c (k_thread_cpu_pin) src/debug/debug_stream/debug_stream_thread_info.c (k_thread_cpu_pin) src/audio/module_adapter/library/userspace_proxy.c (k_thread_cpu_pin) src/schedule/zephyr_domain.c (k_thread_cpu_mask_clear/enable) src/schedule/zephyr_dma_domain.c (k_thread_cpu_mask_clear/enable) zephyr/edf_schedule.c (k_thread_cpu_mask_clear/enable) Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent 0a87dc3 commit 77fded5

10 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/audio/module_adapter/library/userspace_proxy.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,14 @@ static int userspace_proxy_invoke(struct userspace_context *user_ctx, uint32_t c
220220
goto done;
221221
}
222222

223+
#ifdef CONFIG_SCHED_CPU_MASK
223224
/* Pin worker thread to the same core as the module */
224225
ret = k_thread_cpu_pin(worker.thread_id, cpu_get_id());
225226
if (ret < 0) {
226227
tr_err(&userspace_proxy_tr, "Failed to pin cpu, error: %d", ret);
227228
goto done;
228229
}
230+
#endif
229231

230232
ret = k_work_user_submit_to_queue(&worker.work_queue, &user_ctx->work_item->work_item);
231233
if (ret < 0) {

src/debug/debug_stream/debug_stream_thread_info.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,14 @@ static int thread_info_start(void)
367367
LOG_ERR("k_thread_create() failed for core %u", i);
368368
continue;
369369
}
370+
#ifdef CONFIG_SCHED_CPU_MASK
370371
ret = k_thread_cpu_pin(tid, i);
371372
if (ret < 0) {
372373
LOG_ERR("Pinning thread to code core %u", i);
373374
k_thread_abort(tid);
374375
continue;
375376
}
377+
#endif
376378
snprintf(name, sizeof(name), "%u thread info", i);
377379
ret = k_thread_name_set(tid, name);
378380
if (ret < 0)

src/ipc/ipc-common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,9 @@ __cold int ipc_init(struct sof *sof)
337337

338338
k_thread_suspend(thread);
339339

340+
#ifdef CONFIG_SCHED_CPU_MASK
340341
k_thread_cpu_pin(thread, PLATFORM_PRIMARY_CORE_ID);
342+
#endif
341343
k_thread_name_set(thread, "ipc_send_wq");
342344

343345
k_thread_resume(thread);

src/schedule/zephyr_dma_domain.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,10 @@ static int zephyr_dma_domain_register(struct ll_schedule_domain *domain,
461461
0,
462462
K_FOREVER);
463463

464+
#ifdef CONFIG_SCHED_CPU_MASK
464465
k_thread_cpu_mask_clear(thread);
465466
k_thread_cpu_mask_enable(thread, core);
467+
#endif
466468
k_thread_name_set(thread, thread_name);
467469

468470
k_thread_start(thread);

src/schedule/zephyr_domain.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ static int zephyr_domain_register(struct ll_schedule_domain *domain,
216216
zephyr_domain_thread_fn, zephyr_domain, INT_TO_POINTER(core),
217217
NULL, CONFIG_LL_THREAD_PRIORITY, 0, K_FOREVER);
218218

219+
#ifdef CONFIG_SCHED_CPU_MASK
219220
k_thread_cpu_mask_clear(thread);
220221
k_thread_cpu_mask_enable(thread, core);
222+
#endif
221223
k_thread_name_set(thread, thread_name);
222224

223225
k_thread_start(thread);
@@ -330,8 +332,10 @@ static int zephyr_domain_register_user(struct ll_schedule_domain *domain,
330332
INT_TO_POINTER(core), NULL, CONFIG_LL_THREAD_PRIORITY,
331333
K_USER, K_FOREVER);
332334

335+
#ifdef CONFIG_SCHED_CPU_MASK
333336
k_thread_cpu_mask_clear(thread);
334337
k_thread_cpu_mask_enable(thread, core);
338+
#endif
335339
k_thread_name_set(thread, thread_name);
336340

337341
k_mem_domain_add_thread(zephyr_ll_mem_domain(), thread);

src/schedule/zephyr_dp_schedule_application.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,12 +493,14 @@ int scheduler_dp_task_init(struct task **task, const struct sof_uuid_entry *uid,
493493
stack_size, dp_thread_fn, ptask, NULL, NULL,
494494
CONFIG_DP_THREAD_PRIORITY, ptask->flags, K_FOREVER);
495495

496+
#ifdef CONFIG_SCHED_CPU_MASK
496497
/* pin the thread to specific core */
497498
ret = k_thread_cpu_pin(pdata->thread_id, core);
498499
if (ret < 0) {
499500
tr_err(&dp_tr, "zephyr task pin to core failed");
500501
goto e_thread;
501502
}
503+
#endif
502504

503505
k_thread_access_grant(pdata->thread_id, pdata->event, &dp_sync[core]);
504506
scheduler_dp_grant(pdata->thread_id, core);

src/schedule/zephyr_dp_schedule_thread.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,14 @@ int scheduler_dp_task_init(struct task **task,
287287
CONFIG_DP_THREAD_PRIORITY, task_memory->task.flags,
288288
K_FOREVER);
289289

290+
#ifdef CONFIG_SCHED_CPU_MASK
290291
/* pin the thread to specific core */
291292
ret = k_thread_cpu_pin(pdata->thread_id, core);
292293
if (ret < 0) {
293294
tr_err(&dp_tr, "zephyr task pin to core failed");
294295
goto e_thread;
295296
}
297+
#endif
296298

297299
#ifdef CONFIG_USERSPACE
298300
if (options & K_USER) {

src/schedule/zephyr_twb_schedule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,13 +441,15 @@ int scheduler_twb_task_init(struct task **task,
441441
goto err;
442442
}
443443

444+
#ifdef CONFIG_SCHED_CPU_MASK
444445
/* pin the thread to specific core */
445446
ret = k_thread_cpu_pin(thread_id, core);
446447
if (ret < 0) {
447448
ret = -EFAULT;
448449
tr_err(&twb_tr, "zephyr task pin to core %d failed", core);
449450
goto err;
450451
}
452+
#endif
451453

452454
/* set the thread name */
453455
if (name) {

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ manifest:
4343

4444
- name: zephyr
4545
repo-path: zephyr
46-
revision: 684c9e8f32e4373a21098559f748f06915f950c9
46+
revision: 217a5ac0ca4671ec0cf5c1fd4ea1d222f492fe1e
4747
remote: zephyrproject
4848

4949
# Import some projects listed in zephyr/west.yml@revision

zephyr/edf_schedule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ int scheduler_init_edf(void)
113113
k_thread_suspend(thread);
114114

115115
k_thread_heap_assign(thread, sof_sys_heap_get());
116+
#ifdef CONFIG_SCHED_CPU_MASK
116117
k_thread_cpu_mask_clear(thread);
117118
k_thread_cpu_mask_enable(thread, PLATFORM_PRIMARY_CORE_ID);
119+
#endif
118120
k_thread_name_set(thread, "edf_workq");
119121

120122
k_thread_resume(thread);

0 commit comments

Comments
 (0)