Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5632816imu; Mon, 26 Nov 2018 03:16:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/VFGCniskYURM02I3vvqRw5OutV2hma1lzQqUvQoIDtdX9V5/bvWFXp9p2v+WxVG7HGZNQS X-Received: by 2002:a63:6205:: with SMTP id w5mr24416981pgb.53.1543231000816; Mon, 26 Nov 2018 03:16:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543231000; cv=none; d=google.com; s=arc-20160816; b=XlBmWQ14vUdZt5JA0XSMjtJyWEyCpXrZc6qK/sQVoWRCg1XayztctjZyk8re6n0IfQ pm3tg45e0lDzSZ3m65TmlaqMNozu+AKwhv7mKr2cp1WI+9f/VsdeAyhKcGjUlgzeJwUf MQ6s9X2tMR0DfgtMRYR5Xp7w7KouRs+LGZxfI7EkyirGZ9y9j1MloWO3zSizTfNOt08t eEK6wz46VYC9RXFjfyOrVlOaJ1Mu+QhdhSzxLDZlhPqpPlgO93N62HqUu7v4DlCB6GrO AsfdUa0KW/X5K+vqTh9kzs2aBqlkh7rdXpYfBYoYR3ygflfvjoPnD4crHRH7walE8LmR dvaw== 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=F90wh0c0zt5QtjCSSjs7n+/NImLUB9jTEAh3Srkch2o=; b=zVTkc/iJnYZbGdKfClmwD/QVLioDPmA2iv/85VEyKdxOu2DP8kT7ud1RPK/6/JX7yN v4b+6bfhawVAdlSYqZSgAENlcU58gI/t5ZVsY/8jreQ+SPEx91bP/id0tNY+UjZ/yP/Z PIyVYYDLJB+yZRiPeXtGxGLgj4YYMhgpssRuBFIXJDr0DQqdSWTx4oDSad6yaLtvatCc KzstTQZ6WceM/RDS5M10CXSHYs9oWoC2jcenh3m6mtgu4B+Z6262PPHNd0xOU5tdn+Kl wWsSx3DSKH5G2Rb3ZoYpEUZjELY24mqEUrpvFbdpG4uQOoFUH5FTusWBFaSZOajyf4ei F+IQ== 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 v9si55714169pgt.464.2018.11.26.03.16.26; Mon, 26 Nov 2018 03:16:40 -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 S1730771AbeKZWHi (ORCPT + 99 others); Mon, 26 Nov 2018 17:07:38 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60914 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727642AbeKZWHh (ORCPT ); Mon, 26 Nov 2018 17:07:37 -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 B4653356D; Mon, 26 Nov 2018 03:13:49 -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 0A5DD3F5AF; Mon, 26 Nov 2018 03:13:44 -0800 (PST) From: Andrew Murray To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Shawn Guo , Sascha Hauer , Will Deacon , Mark Rutland , Benjamin Herrenschmidt , Thomas Gleixner , Borislav Petkov , x86@kernel.org, Ralf Baechle , Paul Burton , James Hogan , Martin Schwidefsky , Heiko Carstens , "David S . Miller" , sparclinux@vger.kernel.org, Michael Ellerman Cc: linux-s390@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-alpha@vger.kernel.org Subject: [PATCH v2 05/20] alpha: perf/core: remove unnecessary checks for exclusion Date: Mon, 26 Nov 2018 11:12:21 +0000 Message-Id: <1543230756-15319-6-git-send-email-andrew.murray@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543230756-15319-1-git-send-email-andrew.murray@arm.com> References: <1543230756-15319-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 As the Alpha PMU doesn't support context exclusion we do not advertise the PERF_PMU_CAP_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's remove the now unnecessary check for exclusion flags. This change means that __hw_perf_event_init will now also indicate that it doesn't support exclude_host and exclude_guest and will now implicitly return -EINVAL instead of -EPERM. This is likely more desirable as -EPERM will result in a kernel.perf_event_paranoid related warning from the perf userspace utility. Signed-off-by: Andrew Murray --- arch/alpha/kernel/perf_event.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index 5613aa37..5c17077 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha/kernel/perf_event.c @@ -630,12 +630,6 @@ static int __hw_perf_event_init(struct perf_event *event) return ev; } - /* The EV67 does not support mode exclusion */ - if (attr->exclude_kernel || attr->exclude_user - || attr->exclude_hv || attr->exclude_idle) { - return -EPERM; - } - /* * We place the event type in event_base here and leave calculation * of the codes to programme the PMU for alpha_pmu_enable() because -- 2.7.4