Skip to content

Commit d7c5b10

Browse files
committed
ipc: common: make Zephyr the default build config
Zephyr is now mandatory so we can remove ifdefs. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent bd08ae0 commit d7c5b10

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/ipc/ipc-common.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,13 @@ void ipc_send_queued_msg(void)
175175
k_spin_unlock(&ipc->lock, key);
176176
}
177177

178-
#ifdef __ZEPHYR__
179178
static K_THREAD_STACK_DEFINE(ipc_send_wq_stack, CONFIG_STACK_SIZE_IPC_TX);
180-
#endif
181179

182180
static void schedule_ipc_worker(void)
183181
{
184-
/*
185-
* note: in XTOS builds, this is handled in
186-
* task_main_primary_core()
187-
*/
188-
#ifdef __ZEPHYR__
189182
struct ipc *ipc = ipc_get();
190183

191184
k_work_schedule_for_queue(&ipc->ipc_send_wq, &ipc->z_delayed_work, K_USEC(IPC_PERIOD_USEC));
192-
#endif
193185
}
194186

195187
__cold void ipc_msg_send_direct(struct ipc_msg *msg, void *data)
@@ -229,23 +221,6 @@ void ipc_msg_send(struct ipc_msg *msg, void *data, bool high_priority)
229221
assert(!ret);
230222
}
231223

232-
/*
233-
* note: This function can be executed in LL or EDF context, from any core.
234-
* In Zephyr builds, there is IPC queue that is always handled by the primary core,
235-
* whereas submitting to the queue is allowed from any core. Therefore disable option
236-
* of sending IPC immediately by any context/core to secure IPC registers/mailbox
237-
* access.
238-
*/
239-
#ifndef __ZEPHYR__
240-
/* try to send critical notifications right away */
241-
if (high_priority) {
242-
ret = ipc_platform_send_msg(msg);
243-
if (!ret) {
244-
k_spin_unlock(&ipc->lock, key);
245-
return;
246-
}
247-
}
248-
#endif
249224
/* add to queue unless already there */
250225
if (list_is_empty(&msg->list)) {
251226
if (high_priority)
@@ -260,7 +235,6 @@ void ipc_msg_send(struct ipc_msg *msg, void *data, bool high_priority)
260235
}
261236
EXPORT_SYMBOL(ipc_msg_send);
262237

263-
#ifdef __ZEPHYR__
264238
static void ipc_work_handler(struct k_work *work)
265239
{
266240
struct ipc *ipc = ipc_get();
@@ -275,7 +249,6 @@ static void ipc_work_handler(struct k_work *work)
275249

276250
k_spin_unlock(&ipc->lock, key);
277251
}
278-
#endif
279252

280253
void ipc_schedule_process(struct ipc *ipc)
281254
{
@@ -322,7 +295,6 @@ __cold int ipc_init(struct sof *sof)
322295
io_perf_monitor_init_data(&sof->ipc->io_perf_out_msg_count, &init_data);
323296
#endif
324297

325-
#ifdef __ZEPHYR__
326298
struct k_thread *thread = &sof->ipc->ipc_send_wq.thread;
327299

328300
k_work_queue_start(&sof->ipc->ipc_send_wq, ipc_send_wq_stack,
@@ -336,7 +308,6 @@ __cold int ipc_init(struct sof *sof)
336308
k_thread_resume(thread);
337309

338310
k_work_init_delayable(&sof->ipc->z_delayed_work, ipc_work_handler);
339-
#endif
340311

341312
return platform_ipc_init(sof->ipc);
342313
}

0 commit comments

Comments
 (0)