Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3863938imu; Mon, 7 Jan 2019 10:52:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN4f78SmCYaULdwM3ETb3eMUaPXzoN7t/Yiuj9MSUSCet2G0AvtYD2ptuY53PvAYBZKbN9Ip X-Received: by 2002:a63:ce08:: with SMTP id y8mr11784756pgf.388.1546887131971; Mon, 07 Jan 2019 10:52:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546887131; cv=none; d=google.com; s=arc-20160816; b=Scgffu/3F417jZu4y6xKu8w2+oLqNHNLBu0bA8mzLssVuBz9WTuS8qoN1DrJWgYZcr n1JGTwwgsdf839hZsgL5Bg0hsxTE/fUpgXU8cff646iE6PH+Se5gAYNuGHXTiSUqJ3CJ IFrbSmDiX20qsC7UJG/k6UysD6qXqDMhBqfOQGpkb7N1z6F8dY1AzjxsK1RQWzMNKVkr 2iWeJWK2D7aBP+yx/6JnTlEGtCIpcpxJCb1jb7BWmruceZ6SQpbiVwfQTj1VtDQhFYPk 6b9gI/UCKXiVkuWEDHAqBN2vQzD9Ee6OLrILnedT8y0zQOj0u73WG/24QQqAjtdipEmf UUhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=MV+JnWbqsTQSBkpvAfTYgWy/+EUEJhYRtXKXMfKeu3Q=; b=GW+BR80fMLXHq/Y3BAq5eKzgKEu78rFXqKOdzEghnicKhxyHTl/LrE1gpoaZPFJn/D Jlx8FZ8o14DTiLz2OZLaifx49AMrQlUwvnNjPycP5DNY7A3Mm3EWsrPqOk3W7kaW7ceV QHIQ/r5ugFbqtyRNytURfVSmEMGR3LA7rpx/cNbGM0ldbncky+IhirUZ+uMEuN7/hUA+ Ou8EFin45Zc2kt3qsrMqp1CIMS5a+9SNY7OiC+zojGHc5qFbSdwkq/l3+nUn9LWKBIRK 6eunc0AEDyDIUFKdGnCnjA9QNNJoXG7rtZN4iRfjX7cRpsn7wjpc0enVdw6iC7Aw69aX x9uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s84si12691115pgs.306.2019.01.07.10.51.57; Mon, 07 Jan 2019 10:52:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730677AbfAGQ2p (ORCPT + 99 others); Mon, 7 Jan 2019 11:28:45 -0500 Received: from foss.arm.com ([217.140.101.70]:34620 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727374AbfAGQ2o (ORCPT ); Mon, 7 Jan 2019 11:28:44 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A1380174E; Mon, 7 Jan 2019 08:28:43 -0800 (PST) Received: from e119886-lin.cambridge.arm.com (unknown [10.37.6.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2BD733F5A0; Mon, 7 Jan 2019 08:28:39 -0800 (PST) From: Andrew Murray To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Richard Henderson , Ivan Kokshaysky , Matt Turner , Will Deacon , Mark Rutland , Shawn Guo , Sascha Hauer , Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Borislav Petkov , Russell King , suzuki.poulose@arm.com, robin.murphy@arm.com, Michael Ellerman Cc: x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-alpha@vger.kernel.org Subject: [PATCH v4 13/13] drivers/perf: use PERF_PMU_CAP_NO_EXCLUDE for Cavium TX2 PMU Date: Mon, 7 Jan 2019 16:27:30 +0000 Message-Id: <1546878450-20341-14-git-send-email-andrew.murray@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546878450-20341-1-git-send-email-andrew.murray@arm.com> References: <1546878450-20341-1-git-send-email-andrew.murray@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Cavium ThunderX2 UNCORE PMU driver doesn't support any event filtering. Let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability to simplify the code. Signed-off-by: Andrew Murray --- drivers/perf/thunderx2_pmu.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/perf/thunderx2_pmu.c b/drivers/perf/thunderx2_pmu.c index c9a1701..43d76c8 100644 --- a/drivers/perf/thunderx2_pmu.c +++ b/drivers/perf/thunderx2_pmu.c @@ -424,15 +424,6 @@ static int tx2_uncore_event_init(struct perf_event *event) if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK) return -EINVAL; - /* We have no filtering of any kind */ - if (event->attr.exclude_user || - event->attr.exclude_kernel || - event->attr.exclude_hv || - event->attr.exclude_idle || - event->attr.exclude_host || - event->attr.exclude_guest) - return -EINVAL; - if (event->cpu < 0) return -EINVAL; @@ -572,6 +563,7 @@ static int tx2_uncore_pmu_register( .start = tx2_uncore_event_start, .stop = tx2_uncore_event_stop, .read = tx2_uncore_event_read, + .capabilities = PERF_PMU_CAP_NO_EXCLUDE, }; tx2_pmu->pmu.name = devm_kasprintf(dev, GFP_KERNEL, -- 2.7.4