Skip to content

Commit 6eb2531

Browse files
committed
zephyr: replace removed IMR_L3_HEAP_SIZE to ace_imr_get_mem_size()
After Zephyr changes in commit af974c30747 replace removed IMR_L3_HEAP_SIZE to ace_imr_get_mem_size(). This fixes build error: zephyr/lib/alloc.c:220:27: error: 'IMR_L3_HEAP_SIZE' undeclared (first use in this function) Signed-off-by: Mateusz Junkier <mateusz.junkier@intel.com>
1 parent 7bb0160 commit 6eb2531

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

zephyr/lib/alloc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <sof/trace/trace.h>
1919
#include <rtos/symbol.h>
2020
#include <rtos/wait.h>
21+
#include <adsp_memory.h>
2122

2223
#define SHARED_BUFFER_HEAP_MEM_SIZE 0
2324

@@ -213,11 +214,11 @@ static inline size_t get_l3_heap_size(void)
213214
{
214215
/*
215216
* Calculate the IMR heap size using:
216-
* - total IMR size
217+
* - total IMR size (dynamically detected by ace_imr_get_mem_size())
217218
* - IMR base address
218219
* - actual IMR heap start
219220
*/
220-
return ROUND_DOWN(IMR_L3_HEAP_SIZE, L3_MEM_PAGE_SIZE);
221+
return ROUND_DOWN(ace_imr_get_mem_size(), L3_MEM_PAGE_SIZE);
221222
}
222223

223224
void l3_heap_save(void)

0 commit comments

Comments
 (0)