From patchwork Tue Jul 1 15:11:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 32904 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 18017203C0 for ; Tue, 1 Jul 2014 15:26:16 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf52650482pab.9 for ; Tue, 01 Jul 2014 08:26:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=+D9WjIOBQp0QbtfUuRVBwNB6yT6WR7OiNomS3yim0Ik=; b=Th36RYaAj6JMvr3QXorjTvbwIDf9W2xGc0BohBqWdbht/GEh+/fYMNVevFqxgcxsOq NML1cI5QoxUnfYa3M56GrVwH42n2ujrgGZOrFBTgFwXBu9eGS9gKTEaShZZ8KuOhPe8X osnnIBvBSWmUKIljvywPw1j3eQmEtnyb9p0HX9IKp3tGIOJUJwSCrdToJ7vMT1gPrQKI Thm0KEV15MNk5lELnYoc0mXFARtDWaN8y835Mf07VINDdg0nyz7ko5/RllaKbFMUe/hI 8o2xrZGDowFpXuyGQkOcqekuGHQtmHuRZyFDCqgtAzhzsAyiaP7ZIH09jrb74JmC+IKy CPJQ== X-Gm-Message-State: ALoCoQkklH42AZv8eRPjq281mVdpU2w2yW6TIheNbA489dWgoG1KW0pZQDuszgddm/FSoe9pwQL2 X-Received: by 10.66.65.109 with SMTP id w13mr912232pas.21.1404228375878; Tue, 01 Jul 2014 08:26:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.40 with SMTP id 37ls2017680qgu.23.gmail; Tue, 01 Jul 2014 08:26:15 -0700 (PDT) X-Received: by 10.52.69.172 with SMTP id f12mr37710747vdu.26.1404228375686; Tue, 01 Jul 2014 08:26:15 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id m4si11567718vev.44.2014.07.01.08.26.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 08:26:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jz11so9786513veb.2 for ; Tue, 01 Jul 2014 08:26:15 -0700 (PDT) X-Received: by 10.220.53.72 with SMTP id l8mr44959239vcg.16.1404228375589; Tue, 01 Jul 2014 08:26: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.221.37.5 with SMTP id tc5csp223317vcb; Tue, 1 Jul 2014 08:26:15 -0700 (PDT) X-Received: by 10.66.66.72 with SMTP id d8mr60978224pat.8.1404228374720; Tue, 01 Jul 2014 08:26:14 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id kn9si26898055pbc.239.2014.07.01.08.26.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jul 2014 08:26:14 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1zvj-0004Oh-6j; Tue, 01 Jul 2014 15:25:11 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1zvg-0003CF-E3 for linux-arm-kernel@lists.infradead.org; Tue, 01 Jul 2014 15:25:09 +0000 Received: from leverpostej.cambridge.arm.com (leverpostej.cambridge.arm.com [10.1.205.151]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s61FBMww008167; Tue, 1 Jul 2014 16:11:41 +0100 (BST) From: Mark Rutland To: will.deacon@arm.com Subject: [PATCH 8/8] arm: perf: krait: stop using singleton PMU Date: Tue, 1 Jul 2014 16:11:18 +0100 Message-Id: <1404227478-9645-9-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1404227478-9645-1-git-send-email-mark.rutland@arm.com> References: <1404227478-9645-1-git-send-email-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140701_082509_156494_D14011B3 X-CRM114-Status: UNSURE ( 9.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Mark Rutland , Stephen Boyd , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mark.rutland@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 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 Currently the krait_pmu_{enable,disable}_event functions use the global cpu_pmu variable while all the other pmu enable/disable functions derive this from the event argument. This patch brings the Krait functions into line with the rest of the PMU backends by deriving the address of the pmu from the event argument. Signed-off-by: Mark Rutland Cc: Will Deacon Cc: Stephen Boyd Acked-by: Stephen Boyd --- arch/arm/kernel/perf_event_v7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index d4129bc..116758b 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c @@ -1286,6 +1286,7 @@ static void krait_pmu_disable_event(struct perf_event *event) unsigned long flags; struct hw_perf_event *hwc = &event->hw; int idx = hwc->idx; + struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); struct pmu_hw_events *events = cpu_pmu->get_hw_events(); /* Disable counter and interrupt */ @@ -1311,6 +1312,7 @@ static void krait_pmu_enable_event(struct perf_event *event) unsigned long flags; struct hw_perf_event *hwc = &event->hw; int idx = hwc->idx; + struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); struct pmu_hw_events *events = cpu_pmu->get_hw_events(); /*