From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqjgW-0006Nw-Lr for qemu-devel@nongnu.org; Mon, 26 Oct 2015 11:27:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqjgV-00015y-QA for qemu-devel@nongnu.org; Mon, 26 Oct 2015 11:27:44 -0400 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:36514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqjgV-00015m-Kq for qemu-devel@nongnu.org; Mon, 26 Oct 2015 11:27:43 -0400 Received: by pacfv9 with SMTP id fv9so200120122pac.3 for ; Mon, 26 Oct 2015 08:27:43 -0700 (PDT) From: Peter Crosthwaite Date: Mon, 26 Oct 2015 08:27:25 -0700 Message-Id: <3b45270a4854d8868dc649bd41c72cfcb3dffd7b.1445842804.git.crosthwaite.peter@gmail.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH v1 3/6] 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 , pbonzini@redhat.com, Peter Crosthwaite 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. Cc: Peter Maydell 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 4b702df..6b6485b 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -509,7 +509,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)); +} + target_ulong 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 e7fda37..3118267 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -4501,11 +4501,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