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-microblaze/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-microblaze/cpu.h b/target-microblaze/cpu.h index bcaff1f..da42483 100644 --- a/target-microblaze/cpu.h +++ b/target-microblaze/cpu.h @@ -281,7 +281,9 @@ MicroBlazeCPU *cpu_mb_init(const char *cpu_model); #define TARGET_PHYS_ADDR_SPACE_BITS 48 #define TARGET_VIRT_ADDR_SPACE_BITS 64 +#ifdef CONFIG_USER_ONLY #define cpu_init(cpu_model) CPU(cpu_mb_init(cpu_model)) +#endif /* MMU modes definitions */ #define MMU_NOMMU_IDX 0 -- 1.9.1