From patchwork Thu Aug 13 10:44:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 52377 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id A494A2031F for ; Thu, 13 Aug 2015 11:04:23 +0000 (UTC) Received: by lbcje9 with SMTP id je9sf14992778lbc.3 for ; Thu, 13 Aug 2015 04:04:22 -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=HSmfqlA2SNdRlbhuAK7pzNME82qzJlahXYzjUBXOQOo=; b=EawjzDLrp3PPW4qr8fZ7pEodOIb84Lktb/CMIJwd/wR6AURT+pynkBzQi1Drov36B4 YI5lY0VUx/bnWtpm/+w7auuyQthgZVWP3m/BguXlEMCdFrTxt8JfQXAemaIExeoUv3J2 LkvMNWwpJOUbAxS6ZSe7Net6GTjoXnQya444y1l711GwCxXdtHt+L93t8LB+Ygs9fj/U LF+xZG9X3TsunylYt675fk0EaIn0+fybFriSmUBnUpkfUf6WpjDCfgWllvM63deUqoIf TVS9qfeVwojKl95PEmYINZbOzMtPlxzjigfB0GGLbS8y6MnWNe0GcTchZlSphtSZcFVb sffA== X-Gm-Message-State: ALoCoQluAX4jfNS9YY/knDNfEXCXEdQJg5mBTiW+std/ginuw9yVlb8LS6NFIcLWhgQDLXaUrH98 X-Received: by 10.180.79.10 with SMTP id f10mr8409472wix.3.1439463862529; Thu, 13 Aug 2015 04:04:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.201 with SMTP id s9ls177646laj.40.gmail; Thu, 13 Aug 2015 04:04:22 -0700 (PDT) X-Received: by 10.112.63.169 with SMTP id h9mr35736699lbs.104.1439463862239; Thu, 13 Aug 2015 04:04:22 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id rn3si1873713lbb.5.2015.08.13.04.04.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2015 04:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbbsx3 with SMTP id sx3so24918229lbb.0 for ; Thu, 13 Aug 2015 04:04:22 -0700 (PDT) X-Received: by 10.112.140.68 with SMTP id re4mr35633949lbb.72.1439463862133; Thu, 13 Aug 2015 04:04:22 -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.7.198 with SMTP id l6csp865862lba; Thu, 13 Aug 2015 04:04:21 -0700 (PDT) X-Received: by 10.50.153.112 with SMTP id vf16mr2263374igb.79.1439463861161; Thu, 13 Aug 2015 04:04:21 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id o10si1211797ioe.121.2015.08.13.04.04.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Aug 2015 04:04:21 -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]:41801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPqJ1-0005Ir-MD for patch@linaro.org; Thu, 13 Aug 2015 07:04:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPq0R-0005Y2-VL for qemu-devel@nongnu.org; Thu, 13 Aug 2015 06:45:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPq0P-0005Xg-M8 for qemu-devel@nongnu.org; Thu, 13 Aug 2015 06:45:07 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPq0P-0005DT-8B for qemu-devel@nongnu.org; Thu, 13 Aug 2015 06:45:05 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZPq07-00070a-J5 for qemu-devel@nongnu.org; Thu, 13 Aug 2015 11:44:47 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 13 Aug 2015 11:44:23 +0100 Message-Id: <1439462687-26903-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1439462687-26903-1-git-send-email-peter.maydell@linaro.org> References: <1439462687-26903-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 03/27] target-arm: Rename and move gt_cnt_reset 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.217.172 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" Rename gt_cnt_reset to gt_timer_reset as the function really resets the timers and not the counters. Move the registration from counter regs to timer regs. Signed-off-by: Edgar E. Iglesias Reviewed-by: Peter Maydell Message-id: 1436791864-4582-4-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- target-arm/helper.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 3f8d06e..8dee980 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1261,7 +1261,7 @@ static void gt_recalc_timer(ARMCPU *cpu, int timeridx) } } -static void gt_cnt_reset(CPUARMState *env, const ARMCPRegInfo *ri) +static void gt_timer_reset(CPUARMState *env, const ARMCPRegInfo *ri) { ARMCPU *cpu = arm_env_get_cpu(env); int timeridx = ri->opc1 & 1; @@ -1414,7 +1414,7 @@ static const ARMCPRegInfo generic_timer_cp_reginfo[] = { { .name = "CNTP_TVAL_EL0", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 3, .crn = 14, .crm = 2, .opc2 = 0, .type = ARM_CP_NO_RAW | ARM_CP_IO, .access = PL1_RW | PL0_R, - .accessfn = gt_ptimer_access, + .accessfn = gt_ptimer_access, .resetfn = gt_timer_reset, .readfn = gt_tval_read, .writefn = gt_tval_write, }, { .name = "CNTV_TVAL", .cp = 15, .crn = 14, .crm = 3, .opc1 = 0, .opc2 = 0, @@ -1425,7 +1425,7 @@ static const ARMCPRegInfo generic_timer_cp_reginfo[] = { { .name = "CNTV_TVAL_EL0", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 3, .crn = 14, .crm = 3, .opc2 = 0, .type = ARM_CP_NO_RAW | ARM_CP_IO, .access = PL1_RW | PL0_R, - .accessfn = gt_vtimer_access, + .accessfn = gt_vtimer_access, .resetfn = gt_timer_reset, .readfn = gt_tval_read, .writefn = gt_tval_write, }, /* The counter itself */ @@ -1437,8 +1437,7 @@ static const ARMCPRegInfo generic_timer_cp_reginfo[] = { { .name = "CNTPCT_EL0", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 3, .crn = 14, .crm = 0, .opc2 = 1, .access = PL0_R, .type = ARM_CP_NO_RAW | ARM_CP_IO, - .accessfn = gt_pct_access, - .readfn = gt_cnt_read, .resetfn = gt_cnt_reset, + .accessfn = gt_pct_access, .readfn = gt_cnt_read, }, { .name = "CNTVCT", .cp = 15, .crm = 14, .opc1 = 1, .access = PL0_R, .type = ARM_CP_64BIT | ARM_CP_NO_RAW | ARM_CP_IO, @@ -1448,8 +1447,7 @@ static const ARMCPRegInfo generic_timer_cp_reginfo[] = { { .name = "CNTVCT_EL0", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 3, .crn = 14, .crm = 0, .opc2 = 2, .access = PL0_R, .type = ARM_CP_NO_RAW | ARM_CP_IO, - .accessfn = gt_vct_access, - .readfn = gt_virt_cnt_read, .resetfn = gt_cnt_reset, + .accessfn = gt_vct_access, .readfn = gt_virt_cnt_read, }, /* Comparison value, indicating when the timer goes off */ { .name = "CNTP_CVAL", .cp = 15, .crm = 14, .opc1 = 2,