diff --git a/src/kernel/debug/telemetry/telemetry.c b/src/kernel/debug/telemetry/telemetry.c index 0942fdba4705..de8d27ed10e9 100644 --- a/src/kernel/debug/telemetry/telemetry.c +++ b/src/kernel/debug/telemetry/telemetry.c @@ -97,7 +97,7 @@ static struct telemetry_shared_state tel_state_storage __aligned(64); static inline struct telemetry_shared_state *tel_state(void) { - return (struct telemetry_shared_state *)cache_to_uncache( + return (struct telemetry_shared_state *)sys_cache_uncached_ptr_get( (__sparse_force void __sparse_cache *)&tel_state_storage); } diff --git a/src/kernel/idc/zephyr_idc.c b/src/kernel/idc/zephyr_idc.c index e5023cba649f..1192278bcd1e 100644 --- a/src/kernel/idc/zephyr_idc.c +++ b/src/kernel/idc/zephyr_idc.c @@ -81,7 +81,7 @@ static void idc_handler(struct k_p4wq_work *work) int payload = -1; k_spinlock_key_t key; - __ASSERT_NO_MSG(!is_cached(msg)); + __ASSERT_NO_MSG(!sys_cache_is_ptr_cached(msg)); if (msg->size == sizeof(int)) { const int idc_handler_memcpy_err __unused = @@ -173,7 +173,7 @@ static int idc_send_msg_kernel(struct idc_msg *msg, uint32_t mode) /* Temporarily store sender core ID */ msg_cp->core = cpu_get_id(); - __ASSERT_NO_MSG(!is_cached(msg_cp)); + __ASSERT_NO_MSG(!sys_cache_is_ptr_cached(msg_cp)); k_p4wq_submit(q_zephyr_idc + target_cpu, work); diff --git a/src/kernel/ipc/ipc-zephyr.c b/src/kernel/ipc/ipc-zephyr.c index 0748a0c084bb..32416a2ee749 100644 --- a/src/kernel/ipc/ipc-zephyr.c +++ b/src/kernel/ipc/ipc-zephyr.c @@ -196,7 +196,7 @@ static inline void increment_ipc_received_counter(void) static inline void increment_ipc_processed_counter(void) { static uint32_t ipc_processed_counter; - uint32_t *uncache_counter = cache_to_uncache(&ipc_processed_counter); + uint32_t *uncache_counter = sys_cache_uncached_ptr_get(&ipc_processed_counter); mailbox_sw_reg_write(SRAM_REG_FW_IPC_PROCESSED_COUNT, (*uncache_counter)++); diff --git a/zephyr/include/rtos/cache.h b/zephyr/include/rtos/cache.h index c67279655cbb..cc707f323338 100644 --- a/zephyr/include/rtos/cache.h +++ b/zephyr/include/rtos/cache.h @@ -26,7 +26,6 @@ * TODO: if possible, move these to Zephyr. */ #define SRAM_UNCACHED_ALIAS 0x20000000 -#define is_cached(address) (!!((uintptr_t)(address) & SRAM_UNCACHED_ALIAS)) #endif /* defined(CONFIG_XTENSA) && defined(CONFIG_INTEL) */