[PATCH v2 1/3] ppc: define sync_caches_for_execution only for MPC85xx

Ahmad Fatoum
2026-04-14T08:07:30Z

In preparation for adding a call to sync_caches_for_execution() into
common code, make sure PowerPC configurations without an out-of-line
definition fallback to the inline no-op definition.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
v1 -> v2:
- new commit to fix CI breakage (Sascha)
---
arch/powerpc/include/asm/cache.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h
index 2edf11de2ef8..29746fd1945f 100644
--- a/arch/powerpc/include/asm/cache.h
+++ b/arch/powerpc/include/asm/cache.h
@@ -35,8 +35,10 @@ extern void clean_dcache_range(unsigned long start, unsigned long stop);
extern void invalidate_dcache_range(unsigned long start, unsigned long stop);
extern void flush_dcache(void);
extern void invalidate_icache(void);
+#ifdef CONFIG_ARCH_MPC85XX
#define sync_caches_for_execution sync_caches_for_execution
extern void sync_caches_for_execution(void);
+#endif
#ifdef CFG_INIT_RAM_LOCK
extern void unlock_ram_in_cache(void);
#endif /* CFG_INIT_RAM_LOCK */
@@ -88,4 +90,6 @@ extern void unlock_ram_in_cache(void);
#define DC_LES 0x20000000 /* Caches are little endian mode */
#endif /* CONFIG_8xx */

+#include <asm-generic/cache.h>
+
#endif
--
2.47.3