From patchwork Mon Jul 24 21:17:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Leeder X-Patchwork-Id: 9860571 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 DA4B860385 for ; Mon, 24 Jul 2017 21:17:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDE78285E7 for ; Mon, 24 Jul 2017 21:17:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2917285EA; Mon, 24 Jul 2017 21:17:43 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A810285E7 for ; Mon, 24 Jul 2017 21:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=eSsZGgQkJd+JK68c2fc123PIPwOUwJR1BA1Jbz1sBfY=; b=RRz 2PBOLZ3OOIPBW7YfEIWjCQ8uJayTz1PZeNfVDH23CTZPJxZDr87QVtMsE3oDwbWF2hLbZjVM+h1LN x23bIWX1WNJXFKBQnVTSVwDPYmirI6YiAj6Q/q9808VWYP3clMunaXRiiP696hqZdfCAJWq6KrZTY XrpTLZ25An6XOU+Q4CFI/iBIs9PqMacOyi1TqSTTR6gdK69LxqBYtPkziXQloqVDOHLKO/iI9a1L7 KnnVlXNCv/4tjdum92sD+BRGP6VWKc4dgGXuKidWWEzWUYD2akYTJvZiFnGzna2f/EGry7TT1DZxY bCY0WwguP6m/vXm3rNKYTazx5Nd+yfQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dZkjU-0005ju-53; Mon, 24 Jul 2017 21:17:40 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dZkjQ-0005iv-DM for linux-arm-kernel@lists.infradead.org; Mon, 24 Jul 2017 21:17:38 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 73E1E607B6; Mon, 24 Jul 2017 21:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1500931035; bh=yGmlN/gqyIyXUYCw4hx8qiHL3b1ikGw089P58jGg1ug=; h=From:To:Cc:Subject:Date:From; b=jXdufQEHURbY6yDlrBbEcYiJmeYseG2qT0A4c7S5DV2oD4ZKIJ/tfVrYX72nlOENm HMNsp42ggloEY3d5lJOCFDA/0/XW6GDPixHty7bC8Uh13if6643UPiW4ler+UzIUgu mLrhY5Gi4QgDmRGNDm+MtErtVyO/GOEm5WmwH0Sw= Received: from codeaurora.org (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: nleeder@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 10AB26079E; Mon, 24 Jul 2017 21:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1500931035; bh=yGmlN/gqyIyXUYCw4hx8qiHL3b1ikGw089P58jGg1ug=; h=From:To:Cc:Subject:Date:From; b=jXdufQEHURbY6yDlrBbEcYiJmeYseG2qT0A4c7S5DV2oD4ZKIJ/tfVrYX72nlOENm HMNsp42ggloEY3d5lJOCFDA/0/XW6GDPixHty7bC8Uh13if6643UPiW4ler+UzIUgu mLrhY5Gi4QgDmRGNDm+MtErtVyO/GOEm5WmwH0Sw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 10AB26079E 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=nleeder@codeaurora.org From: Neil Leeder To: Will Deacon , Mark Rutland Subject: [PATCH] perf: qcom_l2: fix column exclusion check Date: Mon, 24 Jul 2017 17:17:02 -0400 Message-Id: <1500931022-21000-1-git-send-email-nleeder@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170724_141736_513530_86A3473E X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Langsdorf , Jon Masters , Timur Tabi , linux-kernel@vger.kernel.org, Mark Brown , Mark Salter , nleeder@codeaurora.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The check for column exclusion did not verify that the event being checked was an L2 event, and not a software event. Software events should not be checked for column exclusion. This resulted in a group with both software and L2 events sometimes incorrectly rejecting the L2 event for column exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Signed-off-by: Neil Leeder Acked-by: Mark Rutland --- drivers/perf/qcom_l2_pmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index c259848..b242cce 100644 --- a/drivers/perf/qcom_l2_pmu.c +++ b/drivers/perf/qcom_l2_pmu.c @@ -546,6 +546,7 @@ static int l2_cache_event_init(struct perf_event *event) } if ((event != event->group_leader) && + !is_software_event(event->group_leader) && (L2_EVT_GROUP(event->group_leader->attr.config) == L2_EVT_GROUP(event->attr.config))) { dev_dbg_ratelimited(&l2cache_pmu->pdev->dev, @@ -558,6 +559,7 @@ static int l2_cache_event_init(struct perf_event *event) list_for_each_entry(sibling, &event->group_leader->sibling_list, group_entry) { if ((sibling != event) && + !is_software_event(sibling) && (L2_EVT_GROUP(sibling->attr.config) == L2_EVT_GROUP(event->attr.config))) { dev_dbg_ratelimited(&l2cache_pmu->pdev->dev,