Skip to content

Commit 8ff8834

Browse files
lyakhnashif
authored andcommitted
xtensa: sparse: fix address space mismatch
Fix remaining sparse address space mismatch warnings. Signed-off-by: Guennadi Liakhovetski <[email protected]>
1 parent 22a8af5 commit 8ff8834

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

soc/xtensa/intel_adsp/ace/power.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <zephyr/kernel.h>
77
#include <zephyr/pm/pm.h>
88
#include <zephyr/device.h>
9+
#include <zephyr/debug/sparse.h>
910
#include <cpu_init.h>
1011

1112
#include <xtensa/corebits.h>
@@ -197,7 +198,8 @@ __imr void pm_state_imr_restore(void)
197198
{
198199
struct imr_layout *imr_layout = (struct imr_layout *)(IMR_LAYOUT_ADDRESS);
199200
/* restore lpsram power and contents */
200-
bmemcpy(z_soc_uncached_ptr(UINT_TO_POINTER(LP_SRAM_BASE)),
201+
bmemcpy(z_soc_uncached_ptr((__sparse_force void __sparse_cache *)
202+
UINT_TO_POINTER(LP_SRAM_BASE)),
201203
imr_layout->imr_state.header.imr_ram_storage,
202204
LP_SRAM_SIZE);
203205

soc/xtensa/intel_adsp/common/include/adsp_debug_window.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define _ZEPHYR_SOC_INTEL_ADSP_DEBUG_WINDOW
66

77
#include <mem_window.h>
8+
#include <zephyr/debug/sparse.h>
89

910
/*
1011
* SRAM window for debug info (window 2) is organized in slots,
@@ -63,11 +64,10 @@ struct adsp_debug_window {
6364
uint8_t slots[ADSP_DW_SLOT_COUNT][ADSP_DW_SLOT_SIZE];
6465
} __packed;
6566

66-
67-
6867
#define WIN2_MBASE DT_REG_ADDR(DT_PHANDLE(DT_NODELABEL(mem_window2), memory))
6968

7069
#define ADSP_DW ((volatile struct adsp_debug_window *) \
71-
(z_soc_uncached_ptr((void *)(WIN2_MBASE + WIN2_OFFSET))))
70+
(z_soc_uncached_ptr((__sparse_force void __sparse_cache *) \
71+
(WIN2_MBASE + WIN2_OFFSET))))
7272

7373
#endif

0 commit comments

Comments
 (0)