From patchwork Wed Apr 19 17:41:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lindsay X-Patchwork-Id: 9688569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ABAE5602DC for ; Wed, 19 Apr 2017 17:53:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0D9426224 for ; Wed, 19 Apr 2017 17:53:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94397283E8; Wed, 19 Apr 2017 17:53:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 21CA826224 for ; Wed, 19 Apr 2017 17:53:31 +0000 (UTC) Received: from localhost ([::1]:49681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0tnG-0000et-BM for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Apr 2017 13:53:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0tcC-0008Mh-1C for qemu-devel@nongnu.org; Wed, 19 Apr 2017 13:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0tcB-0004TQ-6x for qemu-devel@nongnu.org; Wed, 19 Apr 2017 13:42:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38004) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d0tc7-0004QR-6h; Wed, 19 Apr 2017 13:41:59 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5CFCB61110; Wed, 19 Apr 2017 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1492623718; bh=DOEQgCYbmRI4K8pa91Bo4IMqRSp5D9GTpc5ABPezHuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WEAZJFZxb7KoRav55OfYeuyksFSn8e0w4qlhOOFfHUuZ3I4mR6o1w0pC3gqWHhJYH ihxg3h6Y4mklypJOlwjgLyHIaUNPFKw6RXY4xSlP5XdoqnPuWNSJ5IDj+CF0tqSmUH HdpqD4fgbXccrcVizKaF9vqEgBLidJRl1onU1xA4= Received: from mossypile.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: alindsay@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6A4A96110D; Wed, 19 Apr 2017 17:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1492623718; bh=DOEQgCYbmRI4K8pa91Bo4IMqRSp5D9GTpc5ABPezHuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WEAZJFZxb7KoRav55OfYeuyksFSn8e0w4qlhOOFfHUuZ3I4mR6o1w0pC3gqWHhJYH ihxg3h6Y4mklypJOlwjgLyHIaUNPFKw6RXY4xSlP5XdoqnPuWNSJ5IDj+CF0tqSmUH HdpqD4fgbXccrcVizKaF9vqEgBLidJRl1onU1xA4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6A4A96110D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=alindsay@codeaurora.org From: Aaron Lindsay To: Peter Maydell , qemu-arm@nongnu.org Date: Wed, 19 Apr 2017 13:41:23 -0400 Message-Id: <1492623684-25799-13-git-send-email-alindsay@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1492623684-25799-1-git-send-email-alindsay@codeaurora.org> References: <1492623684-25799-1-git-send-email-alindsay@codeaurora.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.145.29.96 Subject: [Qemu-devel] [PATCH 12/13] target/arm: PMU: Set PMCR.N to 4 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mspradli@codeaurora.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This both advertises that we support four counters and adds them to the implementation because the PMU_NUM_COUNTERS macro reads this value from the PMCR. Signed-off-by: Aaron Lindsay --- target/arm/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 5972984..a15b932 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -4936,7 +4936,8 @@ void register_cp_regs_for_features(ARMCPU *cpu) .access = PL0_RW, .accessfn = pmreg_access, .type = ARM_CP_IO, .fieldoffset = offsetof(CPUARMState, cp15.c9_pmcr), - .resetvalue = cpu->midr & 0xff000000, + /* 4 counters enabled */ + .resetvalue = (cpu->midr & 0xff000000) | (0x4 << PMCRN_SHIFT), .writefn = pmcr_write, .raw_writefn = raw_write, }; define_one_arm_cp_reg(cpu, &pmcr);