cpu_init is only used by user-mode code. Don't define it for system emulation. This prepares support for multi-arch as in multi-arch system mode multiple cpu.h's from different archs may get included together and this guards against a multiple def.
It also has the added bonus of no new system machine models being able to use the legacy cpu_init() call. Signed-off-by: Peter Crosthwaite <crosthwaite.pe...@gmail.com> --- target-arm/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 7833ff9..e0363a2 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -1555,7 +1555,9 @@ static inline bool arm_excp_unmasked(CPUState *cs, unsigned int excp_idx) return unmasked || pstate_unmasked; } +#ifdef CONFIG_USER_ONLY #define cpu_init(cpu_model) CPU(cpu_arm_init(cpu_model)) +#endif #define cpu_list arm_cpu_list -- 1.9.1