From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YywUb-0002wX-VU for qemu-devel@nongnu.org; Sun, 31 May 2015 02:13:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YywUb-0000jF-3x for qemu-devel@nongnu.org; Sun, 31 May 2015 02:13:05 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:32819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YywUa-0000j8-U8 for qemu-devel@nongnu.org; Sun, 31 May 2015 02:13:05 -0400 Received: by padj3 with SMTP id j3so21089265pad.0 for ; Sat, 30 May 2015 23:13:04 -0700 (PDT) From: Peter Crosthwaite Date: Sat, 30 May 2015 23:11:56 -0700 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [RFC v2 23/34] arm: cpu: static inline cpu_arm_init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Peter Crosthwaite , pbonzini@redhat.com, edgar.iglesias@gmail.com, afaerber@suse.de, rth@twiddle.net 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 --- 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 5a4cd84..99a6c7e 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -487,7 +487,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)); +} + int cpu_arm_exec(CPUState *cpu); uint32_t do_arm_semihosting(CPUARMState *env); void aarch64_sync_32_to_64(CPUARMState *env); diff --git a/target-arm/helper.c b/target-arm/helper.c index 5d0f011..bc7751b 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -3448,11 +3448,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