Skip to content
Draft
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
2 changes: 1 addition & 1 deletion src/kernel/debug/telemetry/telemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions src/kernel/idc/zephyr_idc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/kernel/ipc/ipc-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)++);
Expand Down
1 change: 0 additions & 1 deletion zephyr/include/rtos/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */

Expand Down
Loading