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
7 changes: 4 additions & 3 deletions src/idc/zephyr_idc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

#include <zephyr/kernel.h>
#include <zephyr/cache.h>

#include <zephyr/sys/p4wq.h>
#include <rtos/idc.h>
Expand Down Expand Up @@ -62,7 +63,7 @@ static void idc_handler(struct k_p4wq_work *work)
int payload = -1;
k_spinlock_key_t key;

SOC_DCACHE_INVALIDATE(msg, sizeof(*msg));
sys_cache_data_flush_range(msg, sizeof(*msg));

if (msg->size == sizeof(int)) {
const int idc_handler_memcpy_err __unused =
Expand Down Expand Up @@ -122,13 +123,13 @@ int idc_send_msg(struct idc_msg *msg, uint32_t mode)
msg->payload, msg->size);
assert(!idc_send_memcpy_err);

SOC_DCACHE_FLUSH(payload->data, MIN(sizeof(payload->data), msg->size));
sys_cache_data_flush_range(payload->data, MIN(sizeof(payload->data), msg->size));
}

/* Temporarily store sender core ID */
msg_cp->core = cpu_get_id();

SOC_DCACHE_FLUSH(msg_cp, sizeof(*msg_cp));
sys_cache_data_flush_range(msg_cp, sizeof(*msg_cp));
k_p4wq_submit(q_zephyr_idc + target_cpu, work);

switch (mode) {
Expand Down
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: 9028ad5d713baaf7c44c699e515e40eb6ccdf475
revision: 3e02d48e4ead9978d10ee760c640bf55873f6e95
remote: zephyrproject

# Import some projects listed in zephyr/west.yml@revision
Expand Down
8 changes: 3 additions & 5 deletions zephyr/lib/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
#include <zephyr/pm/policy.h>
#include <version.h>
#include <zephyr/sys/__assert.h>

#if defined(CONFIG_ARCH_XTENSA) && !defined(CONFIG_KERNEL_COHERENCE)
#include <zephyr/arch/xtensa/cache.h>
#endif
#include <zephyr/cache.h>

#if CONFIG_SYS_HEAP_RUNTIME_STATS && CONFIG_IPC_MAJOR_4
#include <zephyr/sys/sys_heap.h>
Expand Down Expand Up @@ -215,7 +212,8 @@ static void heap_free(struct k_heap *h, void *mem)

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

mem = mem_uncached;
}
Expand Down