From patchwork Tue Jul 25 20:22:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Leeder X-Patchwork-Id: 9863329 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 384C9601A1 for ; Tue, 25 Jul 2017 20:22:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 372582870E for ; Tue, 25 Jul 2017 20:22:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C01B28711; Tue, 25 Jul 2017 20:22:52 +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 A7F852870E for ; Tue, 25 Jul 2017 20:22:51 +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=hc9t8vrJtC0EsYkusVbmRkzmhscyFUAk3f7dlbjQ4ug=; b=h+Y PpdXzm9P6/2IkACg918GLEr43sWs185xzeBQonz0sdZL3NpwanQfXR+Zyy3Ic07zezml7p2fP+AWI CrK2KtHEyuXoFYaKJauwxxVfjbf6KuQCMT0JPeAdy4riIaU1NX0N2iEitPK3dpSIQh3ZDyIPyvNVE 0lCa3UhBmMRSJIVXS8AkN7sFqygg5Tu/vsreAbOL8jlqnBNRi7FQbAfojv02Vl9qgq6pivo6kICrn 0qkf5sDQa/DA/t1jT6Fz9cDjFULfHa6RScsQFrxIJ415VkYOaRDa/WHVe5jk2+Iy3kbE8Hf1mgAh7 g7IMbl3MB/zyn0zOMi79tAxNU27qSpw==; 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 1da6Ls-0001Mx-Jh; Tue, 25 Jul 2017 20:22:44 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1da6Lp-0001KK-9Z for linux-arm-kernel@lists.infradead.org; Tue, 25 Jul 2017 20:22:42 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DBE6A607CC; Tue, 25 Jul 2017 20:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1501014140; bh=o/ruxjO0u0jbuq4H3gNGSs/VjAuTFRngEesTHVIv40w=; h=From:To:Cc:Subject:Date:From; b=ob6/bJ4mAMdS7n2dEEzEy9ON0t0LfHDd112p4fcW2Q3UKAdGCQ4qYf0i6zpnz93gP ymR+sCbmtFmFEEw0hED/TmucNY8YQAXOBIFsHrwh7rTKgF3jqzOjKsVVz510+8s7+l o1VGtdGHtMV4hMVw9mM/hnPW9P8kYdxw/ppbrcnQ= 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 6BCE36028F; Tue, 25 Jul 2017 20:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1501014140; bh=o/ruxjO0u0jbuq4H3gNGSs/VjAuTFRngEesTHVIv40w=; h=From:To:Cc:Subject:Date:From; b=ob6/bJ4mAMdS7n2dEEzEy9ON0t0LfHDd112p4fcW2Q3UKAdGCQ4qYf0i6zpnz93gP ymR+sCbmtFmFEEw0hED/TmucNY8YQAXOBIFsHrwh7rTKgF3jqzOjKsVVz510+8s7+l o1VGtdGHtMV4hMVw9mM/hnPW9P8kYdxw/ppbrcnQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6BCE36028F 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 v2] perf: qcom_l2: fix column exclusion check Date: Tue, 25 Jul 2017 16:22:14 -0400 Message-Id: <1501014134-15682-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-20170725_132241_460551_4255BA93 X-CRM114-Status: GOOD ( 11.01 ) 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. Fixes: 21bdbb7102ed ("perf: add qcom l2 cache perf events driver") Signed-off-by: Neil Leeder Acked-by: Mark Rutland --- Same code as v1, just added the tags to the commit text. 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,