Skip to content

Commit 2b4d0ea

Browse files
abonislawskilgirdwood
authored andcommitted
Revert "ipc: move most functions to run from DRAM"
This reverts commit 0e53393. Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1 parent 059d00c commit 2b4d0ea

File tree

5 files changed

+53
-165
lines changed

5 files changed

+53
-165
lines changed

src/include/sof/ipc/topology.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ typedef uint32_t ipc_comp;
4949
struct ipc_comp_dev;
5050
const struct comp_driver *ipc4_get_comp_drv(uint32_t module_id);
5151
struct comp_dev *ipc4_get_comp_dev(uint32_t comp_id);
52+
int ipc4_add_comp_dev(struct comp_dev *dev);
53+
const struct comp_driver *ipc4_get_drv(const void *uuid);
5254
int ipc4_chain_manager_create(struct ipc4_chain_dma *cdma);
5355
int ipc4_chain_dma_state(struct comp_dev *dev, struct ipc4_chain_dma *cdma);
5456
int ipc4_create_chain_dma(struct ipc *ipc, struct ipc4_chain_dma *cdma);

src/ipc/ipc-common.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <rtos/cache.h>
2121
#include <sof/lib/cpu.h>
2222
#include <sof/lib/mailbox.h>
23-
#include <sof/lib/memory.h>
2423
#include <sof/list.h>
2524
#include <sof/platform.h>
2625
#include <rtos/sof.h>
@@ -189,14 +188,12 @@ static void schedule_ipc_worker(void)
189188
#endif
190189
}
191190

192-
__cold void ipc_msg_send_direct(struct ipc_msg *msg, void *data)
191+
void ipc_msg_send_direct(struct ipc_msg *msg, void *data)
193192
{
194193
struct ipc *ipc = ipc_get();
195194
k_spinlock_key_t key;
196195
int ret;
197196

198-
assert_can_be_cold();
199-
200197
key = k_spin_lock(&ipc->lock);
201198

202199
/* copy mailbox data to message if not already copied */
@@ -283,10 +280,8 @@ void ipc_schedule_process(struct ipc *ipc)
283280
#endif
284281
}
285282

286-
__cold int ipc_init(struct sof *sof)
283+
int ipc_init(struct sof *sof)
287284
{
288-
assert_can_be_cold();
289-
290285
tr_dbg(&ipc_tr, "ipc_init()");
291286

292287
/* init ipc data */

src/ipc/ipc-helper.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <rtos/cache.h>
2222
#include <sof/lib/cpu.h>
2323
#include <sof/lib/mailbox.h>
24-
#include <sof/lib/memory.h>
2524
#include <sof/list.h>
2625
#include <sof/platform.h>
2726
#include <rtos/sof.h>
@@ -38,10 +37,8 @@
3837

3938
LOG_MODULE_DECLARE(ipc, CONFIG_SOF_LOG_LEVEL);
4039

41-
__cold static bool valid_ipc_buffer_desc(const struct sof_ipc_buffer *desc)
40+
static bool valid_ipc_buffer_desc(const struct sof_ipc_buffer *desc)
4241
{
43-
assert_can_be_cold();
44-
4542
if (desc->caps >= SOF_MEM_CAPS_LOWEST_INVALID)
4643
return false;
4744

@@ -50,12 +47,10 @@ __cold static bool valid_ipc_buffer_desc(const struct sof_ipc_buffer *desc)
5047
}
5148

5249
/* create a new component in the pipeline */
53-
__cold struct comp_buffer *buffer_new(const struct sof_ipc_buffer *desc, bool is_shared)
50+
struct comp_buffer *buffer_new(const struct sof_ipc_buffer *desc, bool is_shared)
5451
{
5552
struct comp_buffer *buffer;
5653

57-
assert_can_be_cold();
58-
5954
tr_info(&buffer_tr, "buffer new size 0x%x id %d.%d flags 0x%x",
6055
desc->size, desc->comp.pipeline_id, desc->comp.id, desc->flags);
6156

@@ -80,7 +75,6 @@ __cold struct comp_buffer *buffer_new(const struct sof_ipc_buffer *desc, bool is
8075
return buffer;
8176
}
8277

83-
/* Called from multiple locations, including ipc_get_comp_by_ppl_id(), so cannot be cold */
8478
int32_t ipc_comp_pipe_id(const struct ipc_comp_dev *icd)
8579
{
8680
switch (icd->type) {
@@ -183,11 +177,9 @@ int comp_verify_params(struct comp_dev *dev, uint32_t flag,
183177
}
184178
EXPORT_SYMBOL(comp_verify_params);
185179

186-
__cold int comp_buffer_connect(struct comp_dev *comp, uint32_t comp_core,
187-
struct comp_buffer *buffer, uint32_t dir)
180+
int comp_buffer_connect(struct comp_dev *comp, uint32_t comp_core,
181+
struct comp_buffer *buffer, uint32_t dir)
188182
{
189-
assert_can_be_cold();
190-
191183
/* check if it's a connection between cores */
192184
if (buffer->core != comp_core) {
193185
#if CONFIG_INCOHERENT
@@ -266,15 +258,13 @@ int ipc_pipeline_complete(struct ipc *ipc, uint32_t comp_id)
266258
ipc_ppl_sink->cd);
267259
}
268260

269-
__cold int ipc_comp_free(struct ipc *ipc, uint32_t comp_id)
261+
int ipc_comp_free(struct ipc *ipc, uint32_t comp_id)
270262
{
271263
struct ipc_comp_dev *icd;
272264
struct comp_buffer *buffer;
273265
struct comp_buffer *safe;
274266
uint32_t flags;
275267

276-
assert_can_be_cold();
277-
278268
/* check whether component exists */
279269
icd = ipc_get_comp_by_id(ipc, comp_id);
280270
if (!icd) {

0 commit comments

Comments
 (0)