From patchwork Fri Aug 29 14:37:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 36293 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A90A2054D for ; Fri, 29 Aug 2014 14:41:07 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id eb12sf15341655oac.5 for ; Fri, 29 Aug 2014 07:41:07 -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=2nV7mNO2tP+2EjlwSdGL4Q7EIxAj2g9Vv3v6e3q6ydI=; b=beJXKM+7/FUqyJgjDMuuG3+2Kmnu9KU8Khj/bbPOQ/xC78zqeuSVrHKoZzgkcpHc/C ZQL6E4Rbd+nYx9+cIN/weGEA1fsgfD07hxf82wROoCauDnTUxkf+rqkdoTxahwzMg0KC YFaZgq/dZSujOJlJ3U5X5Bs/b/xFQ5s3Vc14tevEUgf2aIG37aE0SieLuamEQWoN4jyI 39+i/SxYLTB5wHwA9QhOVfz4YNkUkwir5u0gY7TbmykY3NwyU27lCs4uTabWFFUnFM7C OOeBbI1h1JcEy4vfCdeIJJY+MOX4lK+Ccu1iBYWg9skTZZCPVx5Pnjx1danYwbjKcT8u NdKQ== X-Gm-Message-State: ALoCoQkIFwfNA+Js9B7pqkMSGiubUO0mArpxEzsoUy/LeWnpoxqQZ+J3v7dlj/J2M5br3gzX1VlU X-Received: by 10.182.171.67 with SMTP id as3mr6029680obc.34.1409323267227; Fri, 29 Aug 2014 07:41:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.74 with SMTP id x68ls1107864qge.28.gmail; Fri, 29 Aug 2014 07:41:07 -0700 (PDT) X-Received: by 10.220.97.5 with SMTP id j5mr10678502vcn.16.1409323266906; Fri, 29 Aug 2014 07:41:06 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id w7si285440vcs.17.2014.08.29.07.41.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Aug 2014 07:41:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hy4so2553959vcb.38 for ; Fri, 29 Aug 2014 07:41:06 -0700 (PDT) X-Received: by 10.220.187.134 with SMTP id cw6mr262961vcb.71.1409323266845; Fri, 29 Aug 2014 07:41:06 -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.221.45.67 with SMTP id uj3csp27101vcb; Fri, 29 Aug 2014 07:41:06 -0700 (PDT) X-Received: by 10.140.86.147 with SMTP id p19mr17305271qgd.66.1409323266260; Fri, 29 Aug 2014 07:41:06 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j3si394080qaa.29.2014.08.29.07.41.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 29 Aug 2014 07:41:06 -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]:42350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNNMP-0003TN-7B for patch@linaro.org; Fri, 29 Aug 2014 10:41:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNNJ2-00077S-0C for qemu-devel@nongnu.org; Fri, 29 Aug 2014 10:37:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNNIw-00080a-KB for qemu-devel@nongnu.org; Fri, 29 Aug 2014 10:37:35 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:46762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNNIw-000805-Dw for qemu-devel@nongnu.org; Fri, 29 Aug 2014 10:37:30 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XNNIv-00052J-UJ for qemu-devel@nongnu.org; Fri, 29 Aug 2014 15:37:29 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 29 Aug 2014 15:37:28 +0100 Message-Id: <1409323049-19255-17-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409323049-19255-1-git-send-email-peter.maydell@linaro.org> References: <1409323049-19255-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 16/16] target-arm: Implement pmccfiltr_write function 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.220.179 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 From: Alistair Francis This is the function that is called when writing to the PMCCFILTR_EL0 register Signed-off-by: Alistair Francis Signed-off-by: Peter Crosthwaite Message-id: 73da3da6404855b17d5ae82975a32ff3a4dcae3d.1409025949.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell --- target-arm/helper.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index d213ed1..2b95f33 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -650,6 +650,14 @@ void pmccntr_sync(CPUARMState *env) #endif +static void pmccfiltr_write(CPUARMState *env, const ARMCPRegInfo *ri, + uint64_t value) +{ + pmccntr_sync(env); + env->cp15.pmccfiltr_el0 = value & 0x7E000000; + pmccntr_sync(env); +} + static void pmcntenset_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -801,6 +809,7 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { #endif { .name = "PMCCFILTR_EL0", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 3, .crn = 14, .crm = 15, .opc2 = 7, + .writefn = pmccfiltr_write, .access = PL0_RW, .accessfn = pmreg_access, .type = ARM_CP_IO, .fieldoffset = offsetof(CPUARMState, cp15.pmccfiltr_el0),