From patchwork Fri Sep 12 13:23:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 37320 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3B380203EE for ; Fri, 12 Sep 2014 13:36:17 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id y10sf493726wgg.0 for ; Fri, 12 Sep 2014 06:36:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Eyi4iJg0XFPCE3bxt++Cwc7IE6j8TSwvp0yLel6jqgI=; b=j2eEuRr0irev6pfrIPgB1gA54KNO9hV6VjdJEvMKJ6vQ0K6kyBYjo4EOQBWgr9wQHW cb0tx2AG3VoHiz7Lq5USuKVu3brVLQIw1Bo27MQlmC3wCsp1SDMNnS0YpfPIzDPWhrU0 TDDeYYQaE7kcpbOuGhYGIJ6TCmcl2P5xUTgcxOx22fB7urLeckTQVvKxjiyJ8Uh5YozI Vt8sBqMtEjAV4MbU7tTcGhhHyArbgS/YG2UNS/6dHeSeFbEeWpIUMaOwePvj+29/ayju 7TkIw4b+tB/DgdWmV6YFIWBRlFXatn+8tPCgj7ba3PLJoz1JFHQpuksGxo2tjVkAxP2G TKeQ== X-Gm-Message-State: ALoCoQkXLIMztHr8+RU+Vv3wi24sXChg1csI43mgj4Q13iwAVyX9nJKn4wY008QnuqvY0WvnSIsY X-Received: by 10.112.126.226 with SMTP id nb2mr2286437lbb.3.1410528976044; Fri, 12 Sep 2014 06:36:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.224.129 with SMTP id rc1ls162580lac.55.gmail; Fri, 12 Sep 2014 06:36:15 -0700 (PDT) X-Received: by 10.112.53.199 with SMTP id d7mr3637378lbp.106.1410528975910; Fri, 12 Sep 2014 06:36:15 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by mx.google.com with ESMTPS id l18si6628947lbg.26.2014.09.12.06.36.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Sep 2014 06:36:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id b8so924725lan.39 for ; Fri, 12 Sep 2014 06:36:15 -0700 (PDT) X-Received: by 10.112.163.103 with SMTP id yh7mr8510373lbb.73.1410528975650; Fri, 12 Sep 2014 06:36:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.141.42 with SMTP id rl10csp732844lbb; Fri, 12 Sep 2014 06:36:15 -0700 (PDT) X-Received: by 10.140.23.40 with SMTP id 37mr12618687qgo.30.1410528974488; Fri, 12 Sep 2014 06:36:14 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u8si5675897qat.17.2014.09.12.06.36.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Sep 2014 06:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:45031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSR1I-0003cJ-H8 for patch@linaro.org; Fri, 12 Sep 2014 09:36:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSQpX-0006pt-QA for qemu-devel@nongnu.org; Fri, 12 Sep 2014 09:24:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSQpR-0003z0-Ob for qemu-devel@nongnu.org; Fri, 12 Sep 2014 09:24:03 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:46960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSQpR-0003xI-IJ for qemu-devel@nongnu.org; Fri, 12 Sep 2014 09:23:57 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XSQpP-0003Xt-43 for qemu-devel@nongnu.org; Fri, 12 Sep 2014 14:23:55 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 12 Sep 2014 14:23:43 +0100 Message-Id: <1410528234-13545-13-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1410528234-13545-1-git-send-email-peter.maydell@linaro.org> References: <1410528234-13545-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 81.2.115.146 Subject: [Qemu-devel] [PULL 12/23] target-arm: Move extended_addresses_enabled() to internals.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Move the utility function extended_addresses_enabled() into internals.h; we're going to need to call it from op_helper.c. Signed-off-by: Peter Maydell --- target-arm/helper.c | 11 ----------- target-arm/internals.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 103dfb8..5fd5497 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -304,17 +304,6 @@ void init_cpreg_list(ARMCPU *cpu) g_list_free(keys); } -/* Return true if extended addresses are enabled. - * This is always the case if our translation regime is 64 bit, - * but depends on TTBCR.EAE for 32 bit. - */ -static inline bool extended_addresses_enabled(CPUARMState *env) -{ - return arm_el_is_aa64(env, 1) - || ((arm_feature(env, ARM_FEATURE_LPAE) - && (env->cp15.c2_control & TTBCR_EAE))); -} - static void dacr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { ARMCPU *cpu = arm_env_get_cpu(env); diff --git a/target-arm/internals.h b/target-arm/internals.h index 22f382c..1d788b0 100644 --- a/target-arm/internals.h +++ b/target-arm/internals.h @@ -142,6 +142,17 @@ static inline void update_spsel(CPUARMState *env, uint32_t imm) aarch64_restore_sp(env, cur_el); } +/* Return true if extended addresses are enabled. + * This is always the case if our translation regime is 64 bit, + * but depends on TTBCR.EAE for 32 bit. + */ +static inline bool extended_addresses_enabled(CPUARMState *env) +{ + return arm_el_is_aa64(env, 1) + || ((arm_feature(env, ARM_FEATURE_LPAE) + && (env->cp15.c2_control & TTBCR_EAE))); +} + /* Valid Syndrome Register EC field values */ enum arm_exception_class { EC_UNCATEGORIZED = 0x00,