Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/audio/base_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//

#include <sof/audio/component.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/ut.h>
#include <sof/tlv.h>
#include <ipc4/base_fw.h>
Expand Down Expand Up @@ -857,7 +856,7 @@ static const struct comp_driver comp_basefw = {
},
};

static SHARED_DATA struct comp_driver_info comp_basefw_info = {
static struct comp_driver_info comp_basefw_info = {
.drv = &comp_basefw,
};

Expand Down
2 changes: 1 addition & 1 deletion src/audio/chain_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ static const struct comp_driver comp_chain_dma = {
},
};

static SHARED_DATA struct comp_driver_info comp_chain_dma_info = {
static struct comp_driver_info comp_chain_dma_info = {
.drv = &comp_chain_dma,
};

Expand Down
3 changes: 1 addition & 2 deletions src/audio/component.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/cache.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/uuid.h>
#include <sof/list.h>
#include <rtos/sof.h>
Expand All @@ -36,7 +35,7 @@

LOG_MODULE_REGISTER(component, CONFIG_SOF_LOG_LEVEL);

static APP_SYSUSER_BSS SHARED_DATA struct comp_driver_list cd;
static APP_SYSUSER_BSS struct comp_driver_list cd;

#ifdef CONFIG_SOF_USERSPACE_LL
struct comp_driver_list *comp_drivers_get(void)
Expand Down
3 changes: 1 addition & 2 deletions src/audio/dai-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <rtos/cache.h>
#include <rtos/init.h>
#include <sof/lib/dai.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/notifier.h>
#include <sof/lib/uuid.h>
#include <sof/list.h>
Expand Down Expand Up @@ -1128,7 +1127,7 @@ static const struct comp_driver comp_dai = {
},
};

static SHARED_DATA struct comp_driver_info comp_dai_info = {
static struct comp_driver_info comp_dai_info = {
.drv = &comp_dai,
};

Expand Down
3 changes: 1 addition & 2 deletions src/audio/dai-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <rtos/cache.h>
#include <rtos/init.h>
#include <sof/lib/dai.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/notifier.h>
#include <sof/lib/uuid.h>
#include <sof/lib/dma.h>
Expand Down Expand Up @@ -2092,7 +2091,7 @@ static const struct comp_driver comp_dai = {
},
};

static SHARED_DATA struct comp_driver_info comp_dai_info = {
static struct comp_driver_info comp_dai_info = {
.drv = &comp_dai,
};

Expand Down
3 changes: 1 addition & 2 deletions src/audio/google/google_hotword_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/notifier.h>
#include <rtos/wait.h>
#include <sof/lib/uuid.h>
Expand Down Expand Up @@ -466,7 +465,7 @@ static const struct comp_driver ghd_driver = {
},
};

static SHARED_DATA struct comp_driver_info ghd_driver_info = {
static struct comp_driver_info ghd_driver_info = {
.drv = &ghd_driver,
};

Expand Down
3 changes: 1 addition & 2 deletions src/audio/host-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <rtos/init.h>
#include <sof/lib/dma.h>
#include <sof/lib/mailbox.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/notifier.h>
#include <sof/lib/uuid.h>
#include <sof/list.h>
Expand Down Expand Up @@ -1068,7 +1067,7 @@ static const struct comp_driver comp_host = {
},
};

static SHARED_DATA struct comp_driver_info comp_host_info = {
static struct comp_driver_info comp_host_info = {
.drv = &comp_host,
};

Expand Down
3 changes: 1 addition & 2 deletions src/audio/host-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <rtos/init.h>
#include <sof/lib/dma.h>
#include <sof/lib/mailbox.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/uuid.h>
#include <sof/list.h>
#include <sof/math/numbers.h>
Expand Down Expand Up @@ -1332,7 +1331,7 @@ static const struct comp_driver comp_host = {
},
};

static SHARED_DATA struct comp_driver_info comp_host_info = {
static struct comp_driver_info comp_host_info = {
.drv = &comp_host,
};

Expand Down
3 changes: 1 addition & 2 deletions src/audio/kpb.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <rtos/alloc.h>
#include <rtos/clk.h>
#include <rtos/init.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/pm_runtime.h>
#include <sof/lib/uuid.h>
#include <sof/list.h>
Expand Down Expand Up @@ -2742,7 +2741,7 @@ static const struct comp_driver comp_kpb = {
},
};

static SHARED_DATA struct comp_driver_info comp_kpb_info = {
static struct comp_driver_info comp_kpb_info = {
.drv = &comp_kpb,
};

Expand Down
5 changes: 2 additions & 3 deletions src/audio/pipeline/pipeline-graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ struct pipeline_posn {
#endif
};
/* the pipeline position lookup table */
static APP_SYSUSER_BSS SHARED_DATA struct pipeline_posn pipeline_posn_shared;
static APP_SYSUSER_BSS struct pipeline_posn pipeline_posn_shared;

#ifdef CONFIG_SOF_USERSPACE_LL
/* Mutex pointer in user-accessible partition so user-space threads
* can read the pointer for syscalls. Kept outside the SHARED_DATA
* struct to avoid kernel object tracking issues.
* can read the pointer for syscalls.
*/
static APP_SYSUSER_BSS struct k_mutex *pipeline_posn_mutex;
#endif
Expand Down
3 changes: 1 addition & 2 deletions src/audio/selector/selector.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/uuid.h>
#include <sof/list.h>
#include <rtos/string.h>
Expand Down Expand Up @@ -609,7 +608,7 @@ static const struct comp_driver comp_selector = {
},
};

static SHARED_DATA struct comp_driver_info comp_selector_info = {
static struct comp_driver_info comp_selector_info = {
.drv = &comp_selector,
};

Expand Down
3 changes: 1 addition & 2 deletions src/audio/tone/tone-ipc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/uuid.h>
#include <sof/list.h>
#include <sof/math/trig.h>
Expand Down Expand Up @@ -395,7 +394,7 @@ static const struct comp_driver comp_tone = {
},
};

static SHARED_DATA struct comp_driver_info comp_tone_info = {
static struct comp_driver_info comp_tone_info = {
.drv = &comp_tone,
};

Expand Down
1 change: 0 additions & 1 deletion src/audio/tone/tone-ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/uuid.h>
#include <sof/list.h>
#include <sof/math/trig.h>
Expand Down
1 change: 0 additions & 1 deletion src/audio/tone/tone.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/uuid.h>
#include <sof/list.h>
#include <sof/math/trig.h>
Expand Down
1 change: 0 additions & 1 deletion src/audio/tone/tone.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <sof/ipc/msg.h>
#include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/memory.h> /* for SHARED_DATA */
#include <sof/lib/uuid.h>
#include <sof/list.h>
#include <sof/math/trig.h>
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ DECLARE_TR_CTX(irq_tr, SOF_UUID(irq_uuid), LOG_LEVEL_INFO);
#define interrupt_disable mux_interrupt_disable
#endif

static SHARED_DATA struct cascade_root cascade_root;
static struct cascade_root cascade_root;

static int interrupt_register_internal(uint32_t irq, void (*handler)(void *arg),
void *arg, struct irq_desc *desc);
Expand Down
2 changes: 1 addition & 1 deletion src/idc/idc.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
LOG_MODULE_REGISTER(idc, CONFIG_SOF_LOG_LEVEL);

/** \brief IDC message payload per core. */
static SHARED_DATA struct idc_payload static_payload[CONFIG_CORE_COUNT];
static struct idc_payload static_payload[CONFIG_CORE_COUNT];

SOF_DEFINE_REG_UUID(idc);

Expand Down
2 changes: 1 addition & 1 deletion src/include/sof/audio/module_adapter/module/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static const struct comp_driver comp_##adapter##_module = { \
.adapter_ops = &(adapter), \
}; \
\
static SHARED_DATA struct comp_driver_info comp_module_##adapter##_info = { \
static struct comp_driver_info comp_module_##adapter##_info = { \
.drv = &comp_##adapter##_module, \
}; \
\
Expand Down
2 changes: 1 addition & 1 deletion src/lib/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOF_DEFINE_REG_UUID(clock);

DECLARE_TR_CTX(clock_tr, SOF_UUID(clock_uuid), LOG_LEVEL_INFO);

SHARED_DATA struct k_spinlock clk_lock;
struct k_spinlock clk_lock;

static inline uint32_t clock_get_nearest_freq_idx(const struct freq_table *tab,
uint32_t size, uint32_t hz)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/notifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOF_DEFINE_REG_UUID(notifier);

DECLARE_TR_CTX(nt_tr, SOF_UUID(notifier_uuid), LOG_LEVEL_INFO);

static SHARED_DATA struct notify_data notify_data_shared[CONFIG_CORE_COUNT];
static struct notify_data notify_data_shared[CONFIG_CORE_COUNT];

struct callback_handle {
void *receiver;
Expand Down
1 change: 0 additions & 1 deletion src/platform/amd/acp_6_3/include/platform/lib/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
#if !defined(__ASSEMBLER__) && !defined(LINKER)
struct sof;

#define SHARED_DATA
void platform_init_memmap(struct sof *sof);

static inline void *platform_rfree_prepare(void *ptr)
Expand Down
2 changes: 1 addition & 1 deletion src/platform/amd/acp_6_3/lib/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const struct freq_table platform_cpu_freq[] = {
STATIC_ASSERT(ARRAY_SIZE(platform_cpu_freq) == NUM_CPU_FREQ,
invalid_number_of_cpu_frequencies);

static SHARED_DATA struct clock_info platform_clocks_info[NUM_CLOCKS];
static struct clock_info platform_clocks_info[NUM_CLOCKS];

void audio_pll_power_off(void);
void audio_pll_power_on(void);
Expand Down
2 changes: 1 addition & 1 deletion src/platform/amd/acp_6_3/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern struct dma_ops acp_dai_sp_dma_ops;
extern struct dma_ops acp_dai_hs_dma_ops;
extern struct dma_ops acp_dai_sw_audio_dma_ops;

SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
struct dma dma[PLATFORM_NUM_DMACS] = {
{
.plat_data = {
.id = DMA_ID_DMA0,
Expand Down
32 changes: 16 additions & 16 deletions src/platform/amd/acp_6_3/lib/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@
#include <ipc/topology.h>

/* Heap blocks for system runtime */
static SHARED_DATA struct block_hdr sys_rt_block64[HEAP_SYS_RT_COUNT64];
static SHARED_DATA struct block_hdr sys_rt_block512[HEAP_SYS_RT_COUNT512];
static SHARED_DATA struct block_hdr sys_rt_block1024[HEAP_SYS_RT_COUNT1024];
static struct block_hdr sys_rt_block64[HEAP_SYS_RT_COUNT64];
static struct block_hdr sys_rt_block512[HEAP_SYS_RT_COUNT512];
static struct block_hdr sys_rt_block1024[HEAP_SYS_RT_COUNT1024];

/* Heap memory for system runtime */
static SHARED_DATA struct block_map sys_rt_heap_map[] = {
static struct block_map sys_rt_heap_map[] = {
BLOCK_DEF(64, HEAP_SYS_RT_COUNT64, sys_rt_block64),
BLOCK_DEF(512, HEAP_SYS_RT_COUNT512, sys_rt_block512),
BLOCK_DEF(1024, HEAP_SYS_RT_COUNT1024, sys_rt_block1024),
};

/* Heap blocks for modules */
static SHARED_DATA struct block_hdr mod_block16[HEAP_RT_COUNT16];
static SHARED_DATA struct block_hdr mod_block32[HEAP_RT_COUNT32];
static SHARED_DATA struct block_hdr mod_block64[HEAP_RT_COUNT64];
static SHARED_DATA struct block_hdr mod_block128[HEAP_RT_COUNT128];
static SHARED_DATA struct block_hdr mod_block256[HEAP_RT_COUNT256];
static SHARED_DATA struct block_hdr mod_block512[HEAP_RT_COUNT512];
static SHARED_DATA struct block_hdr mod_block1024[HEAP_RT_COUNT1024];
static SHARED_DATA struct block_hdr mod_block2048[HEAP_RT_COUNT2048];
static struct block_hdr mod_block16[HEAP_RT_COUNT16];
static struct block_hdr mod_block32[HEAP_RT_COUNT32];
static struct block_hdr mod_block64[HEAP_RT_COUNT64];
static struct block_hdr mod_block128[HEAP_RT_COUNT128];
static struct block_hdr mod_block256[HEAP_RT_COUNT256];
static struct block_hdr mod_block512[HEAP_RT_COUNT512];
static struct block_hdr mod_block1024[HEAP_RT_COUNT1024];
static struct block_hdr mod_block2048[HEAP_RT_COUNT2048];

/* Heap memory map for modules */
static SHARED_DATA struct block_map rt_heap_map[] = {
static struct block_map rt_heap_map[] = {
BLOCK_DEF(16, HEAP_RT_COUNT16, mod_block16),
BLOCK_DEF(32, HEAP_RT_COUNT32, mod_block32),
BLOCK_DEF(64, HEAP_RT_COUNT64, mod_block64),
Expand All @@ -46,14 +46,14 @@ static SHARED_DATA struct block_map rt_heap_map[] = {
};

/* Heap blocks for buffers */
static SHARED_DATA struct block_hdr buf_block[HEAP_BUFFER_COUNT];
static struct block_hdr buf_block[HEAP_BUFFER_COUNT];

/* Heap memory map for buffers */
static SHARED_DATA struct block_map buf_heap_map[] = {
static struct block_map buf_heap_map[] = {
BLOCK_DEF(HEAP_BUFFER_BLOCK_SIZE, HEAP_BUFFER_COUNT, buf_block),
};

static SHARED_DATA struct mm memmap = {
static struct mm memmap = {
.system[0] = {
.heap = HEAP_SYSTEM_BASE,
.size = HEAP_SYSTEM_SIZE,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/amd/acp_6_3/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const struct ext_man_windows xsram_window
},
};

static SHARED_DATA struct timer timer = {
static struct timer timer = {
.id = TIMER0,
.irq = IRQ_NUM_TIMER0,
};
Expand Down
1 change: 0 additions & 1 deletion src/platform/amd/acp_7_0/include/platform/lib/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
#if !defined(__ASSEMBLER__) && !defined(LINKER)
struct sof;

#define SHARED_DATA
void platform_init_memmap(struct sof *sof);

static inline void *platform_rfree_prepare(void *ptr)
Expand Down
2 changes: 1 addition & 1 deletion src/platform/amd/acp_7_0/lib/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const struct freq_table platform_cpu_freq[] = {
STATIC_ASSERT(ARRAY_SIZE(platform_cpu_freq) == NUM_CPU_FREQ,
invalid_number_of_cpu_frequencies);

static SHARED_DATA struct clock_info platform_clocks_info[NUM_CLOCKS];
static struct clock_info platform_clocks_info[NUM_CLOCKS];

void audio_pll_power_off(void);
void audio_pll_power_on(void);
Expand Down
2 changes: 1 addition & 1 deletion src/platform/amd/acp_7_0/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern struct dma_ops acp_dai_sp_dma_ops;
extern struct dma_ops acp_dai_hs_dma_ops;
extern struct dma_ops acp_dai_sw_audio_dma_ops;

SHARED_DATA struct dma dma[PLATFORM_NUM_DMACS] = {
struct dma dma[PLATFORM_NUM_DMACS] = {
{
.plat_data = {
.id = DMA_ID_DMA0,
Expand Down
Loading
Loading