Skip to content

Commit 5b9605a

Browse files
dcpleungcarlescufi
authored andcommitted
xtensa: mmu: implement cached/uncached ptr funcs if !RPO_CACHE
This implements the following functions when CONFIG_XTENSA_RPO_CACHE is false: * arch_xtensa_is_ptr_cached() returns false * arch_xtensa_is_ptr_uncached() returns false * arch_xtensa_cached_ptr() returns unmodified pointer * arch_xtensa_uncached_ptr() returns unmodified pointer Signed-off-by: Daniel Leung <[email protected]>
1 parent c6bba39 commit 5b9605a

File tree

1 file changed

+27
-1
lines changed
  • include/zephyr/arch/xtensa

1 file changed

+27
-1
lines changed

include/zephyr/arch/xtensa/arch.h

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,33 @@ static inline void *arch_xtensa_uncached_ptr(void __sparse_cache *ptr)
243243
FOR_EACH(_SET_ONE_TLB, (;), 0, 1, 2, 3, 4, 5, 6, 7); \
244244
} while (0)
245245

246-
#endif
246+
#else /* CONFIG_XTENSA_RPO_CACHE */
247+
248+
static inline bool arch_xtensa_is_ptr_cached(void *ptr)
249+
{
250+
ARG_UNUSED(ptr);
251+
252+
return false;
253+
}
254+
255+
static inline bool arch_xtensa_is_ptr_uncached(void *ptr)
256+
{
257+
ARG_UNUSED(ptr);
258+
259+
return false;
260+
}
261+
262+
static inline void *arch_xtensa_cached_ptr(void *ptr)
263+
{
264+
return ptr;
265+
}
266+
267+
static inline void *arch_xtensa_uncached_ptr(void *ptr)
268+
{
269+
return ptr;
270+
}
271+
272+
#endif /* CONFIG_XTENSA_RPO_CACHE */
247273

248274
#ifdef CONFIG_XTENSA_MMU
249275
extern void arch_xtensa_mmu_post_init(bool is_core0);

0 commit comments

Comments
 (0)