[PATCH 1/3] target/ppc: Expose ppc_cpu_is_big_endian() prototype in 'cpu.h'

Philippe Mathieu-Daudé posted 3 patches 1 month, 3 weeks ago
[PATCH 1/3] target/ppc: Expose ppc_cpu_is_big_endian() prototype in 'cpu.h'
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
Expose ppc_cpu_is_big_endian() so it can be used by hw/ code.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/ppc/cpu.h      | 2 ++
 target/ppc/cpu_init.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 321ed2da75..4a4911502d 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -3007,6 +3007,8 @@ static inline bool ppc_interrupts_little_endian(PowerPCCPU *cpu, bool hv)
 
     return ile;
 }
+
+bool ppc_cpu_is_big_endian(CPUState *cs);
 #endif
 
 void dump_mmu(CPUPPCState *env);
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 23881d09e9..00e0a8bf2c 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7343,7 +7343,7 @@ static void ppc_cpu_reset_hold(Object *obj, ResetType type)
 
 #ifndef CONFIG_USER_ONLY
 
-static bool ppc_cpu_is_big_endian(CPUState *cs)
+bool ppc_cpu_is_big_endian(CPUState *cs)
 {
     cpu_synchronize_state(cs);
 
-- 
2.45.2