From patchwork Mon Sep 14 13:53:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 53563 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 26F2E2056A for ; Mon, 14 Sep 2015 13:54:31 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf41705815wic.2 for ; Mon, 14 Sep 2015 06:54:30 -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=SEpho91Jf6vgLBXXYIlnuz6umerZ2Qf4xjOeivHqAks=; b=g2xAMVJXfX7m2r96q/rd2ZAcjAby9cPdzTAI8ta9otaFpwapRS/WjTMBwFHSyf1VKd 9c0NSo3il6xINLlWgksjo+yNSvOiwraZ8IrSNZXZ6KbFyuCa+LUqU4yD3G/BJys0uHMr EFJgLHyIQeFv33CQ6dNFvNIvW5oLOEIv1rOKV2ZqZDnE0/byf0uoCW0Pc6akrdK2Wkg+ PSV3NGfpXhDBBWA0zq04FJDbIkin1jYlzCzdVvI17lJgcbD3hvpWT8oz4CAwUSJsym6S nHU6rAIRmRyZBEpQSThLrTqY13YF0scyRKti0j/zOm63wNzzXMgob+jaCPkMFWF0Nk/m tSYw== X-Gm-Message-State: ALoCoQm53d37ydcwOpPucw2vAswLBLIye0ILxdQdQMW+sXJJtzlMHCyq069rG7B/Lqu2k2KrIqEK X-Received: by 10.180.208.108 with SMTP id md12mr222347wic.1.1442238870458; Mon, 14 Sep 2015 06:54:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.200 with SMTP id la8ls589359lac.96.gmail; Mon, 14 Sep 2015 06:54:30 -0700 (PDT) X-Received: by 10.153.8.138 with SMTP id dk10mr2839684lad.54.1442238870129; Mon, 14 Sep 2015 06:54:30 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id f3si9804428lag.4.2015.09.14.06.54.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 06:54:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lahg1 with SMTP id g1so57426913lah.1 for ; Mon, 14 Sep 2015 06:54:30 -0700 (PDT) X-Received: by 10.152.18.130 with SMTP id w2mr4701709lad.88.1442238870015; Mon, 14 Sep 2015 06:54:30 -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.59.35 with SMTP id w3csp1213466lbq; Mon, 14 Sep 2015 06:54:28 -0700 (PDT) X-Received: by 10.50.111.167 with SMTP id ij7mr17082950igb.41.1442238868678; Mon, 14 Sep 2015 06:54:28 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c192si7998258ioe.50.2015.09.14.06.54.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Sep 2015 06:54:28 -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]:40976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbUDD-0005bs-85 for patch@linaro.org; Mon, 14 Sep 2015 09:54:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbUC7-0004bW-Ph for qemu-devel@nongnu.org; Mon, 14 Sep 2015 09:53:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbUC6-0000AF-Ry for qemu-devel@nongnu.org; Mon, 14 Sep 2015 09:53:19 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbUC6-00005c-Lq for qemu-devel@nongnu.org; Mon, 14 Sep 2015 09:53:18 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZbUC0-0007uI-HK for qemu-devel@nongnu.org; Mon, 14 Sep 2015 14:53:12 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 14 Sep 2015 14:53:10 +0100 Message-Id: <1442238791-30255-24-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1442238791-30255-1-git-send-email-peter.maydell@linaro.org> References: <1442238791-30255-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 23/24] target-arm: Break out mpidr_read_val() 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.46 as permitted sender) smtp.mailfrom=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 From: "Edgar E. Iglesias" Break out mpidr_read_val() to allow future sharing of the code that conditionally sets the M and U bits of MPIDR. No functional changes. Signed-off-by: Edgar E. Iglesias Message-id: 1442135278-25281-8-git-send-email-edgar.iglesias@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target-arm/helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index d18106c..86900c2 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2457,7 +2457,7 @@ static uint64_t midr_read(CPUARMState *env, const ARMCPRegInfo *ri) return raw_read(env, ri); } -static uint64_t mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri) +static uint64_t mpidr_read_val(CPUARMState *env) { ARMCPU *cpu = ARM_CPU(arm_env_get_cpu(env)); uint64_t mpidr = cpu->mp_affinity; @@ -2475,6 +2475,11 @@ static uint64_t mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri) return mpidr; } +static uint64_t mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri) +{ + return mpidr_read_val(env); +} + static const ARMCPRegInfo mpidr_cp_reginfo[] = { { .name = "MPIDR", .state = ARM_CP_STATE_BOTH, .opc0 = 3, .crn = 0, .crm = 0, .opc1 = 0, .opc2 = 5,