Skip to content

Commit

Permalink
cache: switch over to the new Zephyr cache API
Browse files Browse the repository at this point in the history
z_soc_uncached_ptr() / z_soc_cached_ptr() have been removed from
Zephyr and replaced with sys_cache_uncached_ptr_get() and
sys_cache_cached_ptr_get() respectively.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh committed Feb 26, 2024
1 parent ec5692d commit a01139e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ manifest:

- name: zephyr
repo-path: zephyr
revision: 9183ceaf911965fd1e30f4172e0518c176ed644a
revision: 9d1df132b1ccf28e8a8a216781ca52c6c47ed1fe
remote: zephyrproject

# Import some projects listed in zephyr/west.yml@revision
Expand Down
4 changes: 2 additions & 2 deletions zephyr/lib/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static void __sparse_cache *heap_alloc_aligned_cached(struct k_heap *h,

#ifdef CONFIG_SOF_ZEPHYR_HEAP_CACHED
if (ptr)
ptr = z_soc_cached_ptr((__sparse_force void *)ptr);
ptr = sys_cache_cached_ptr_get((__sparse_force void *)ptr);
#endif

return ptr;
Expand All @@ -246,7 +246,7 @@ static void heap_free(struct k_heap *h, void *mem)
void *mem_uncached;

if (is_cached(mem)) {
mem_uncached = z_soc_uncached_ptr((__sparse_force void __sparse_cache *)mem);
mem_uncached = sys_cache_uncached_ptr_get((__sparse_force void __sparse_cache *)mem);
sys_cache_data_flush_and_invd_range(mem,
sys_heap_usable_size(&h->heap, mem_uncached));

Expand Down

0 comments on commit a01139e

Please sign in to comment.