Move this implementation up to the header so it is visible from system level code once the architecture is converted to arch-obj-y. Alternative would be to create init.c in target-arm/hw but this implementation is trivial enough for static inline.
Signed-off-by: Peter Crosthwaite <crosthwaite.pe...@gmail.com> --- target-arm/cpu.h | 6 +++++- target-arm/helper.c | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index b93db7c..01d01d3 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -499,7 +499,11 @@ typedef struct CPUARMState { #include "cpu-qom.h" -ARMCPU *cpu_arm_init(const char *cpu_model); +static inline ARMCPU *cpu_arm_init(const char *cpu_model) +{ + return ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, cpu_model)); +} + uint32_t do_arm_semihosting(CPUARMState *env); void aarch64_sync_32_to_64(CPUARMState *env); void aarch64_sync_64_to_32(CPUARMState *env); diff --git a/target-arm/helper.c b/target-arm/helper.c index f5df5a0..dcfeb63 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -3651,11 +3651,6 @@ void register_cp_regs_for_features(ARMCPU *cpu) } } -ARMCPU *cpu_arm_init(const char *cpu_model) -{ - return ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, cpu_model)); -} - void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) { CPUState *cs = CPU(cpu); -- 1.9.1