From e728adffd276028934f008ec890ff0c19c32aeb2 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Tue, 19 Mar 2024 21:31:41 +0000 Subject: [PATCH] intel_adsp/ace: pm: Remove unnecessary cache flush core_desc is not located (nor is accessed) in cached memory. There is no need to flush it. Signed-off-by: Flavio Ceolin --- soc/intel/intel_adsp/ace/power.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/soc/intel/intel_adsp/ace/power.c b/soc/intel/intel_adsp/ace/power.c index 0f3cf6a3815..70a519f24ba 100644 --- a/soc/intel/intel_adsp/ace/power.c +++ b/soc/intel/intel_adsp/ace/power.c @@ -150,7 +150,13 @@ static ALWAYS_INLINE void _save_core_context(uint32_t core_id) core_desc[core_id].thread_ptr = XTENSA_RUR("THREADPTR"); __asm__ volatile("mov %0, a0" : "=r"(core_desc[core_id].a0)); __asm__ volatile("mov %0, a1" : "=r"(core_desc[core_id].a1)); + +#if CONFIG_MP_MAX_NUM_CPUS == 1 + /* With one core only, the memory is mapped in cache and we need to flush + * it. + */ sys_cache_data_flush_range(&core_desc[core_id], sizeof(struct core_state)); +#endif } static ALWAYS_INLINE void _restore_core_context(void)