From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932824AbcFCLPX (ORCPT ); Fri, 3 Jun 2016 07:15:23 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56378 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932525AbcFCKx6 (ORCPT ); Fri, 3 Jun 2016 06:53:58 -0400 Date: Fri, 3 Jun 2016 03:51:53 -0700 From: tip-bot for Vineet Gupta Message-ID: Cc: acme@redhat.com, Vineet.Gupta1@synopsys.com, vgupta@synopsys.com, mingo@kernel.org, hpa@zytor.com, torvalds@linux-foundation.org, eranian@google.com, tglx@linutronix.de, linux-snps-arc@lists.infradead.org, peterz@infradead.org, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, jolsa@redhat.com, vincent.weaver@maine.edu Reply-To: acme@redhat.com, Vineet.Gupta1@synopsys.com, vgupta@synopsys.com, peterz@infradead.org, linux-snps-arc@lists.infradead.org, eranian@google.com, tglx@linutronix.de, vincent.weaver@maine.edu, jolsa@redhat.com, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, mingo@kernel.org In-Reply-To: <1462786660-2900-3-git-send-email-vgupta@synopsys.com> References: <1462786660-2900-3-git-send-email-vgupta@synopsys.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf/abi: Change the errno for sampling event not supported in hardware Git-Commit-ID: a1396555abff9ff9b74c2e4da13e27e81fd094b2 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a1396555abff9ff9b74c2e4da13e27e81fd094b2 Gitweb: http://git.kernel.org/tip/a1396555abff9ff9b74c2e4da13e27e81fd094b2 Author: Vineet Gupta AuthorDate: Mon, 9 May 2016 15:07:40 +0530 Committer: Ingo Molnar CommitDate: Fri, 3 Jun 2016 09:40:42 +0200 perf/abi: Change the errno for sampling event not supported in hardware Change the return code for sampling event not supported from -ENOTSUPP to -EOPNOTSUPP. This allows userspace to identify this case specifically, instead of printing the catch-all error message it did previously. Technically this is an ABI change, but we think we can get away with it. Old behavior: ------- | # perf record ls | Error: | The sys_perf_event_open() syscall returned with 524 (Unknown error 524) | for event (cycles:ppp). | /bin/dmesg may provide additional information. | No CONFIG_PERF_EVENTS=y kernel support configured? New behavior: ------- | # perf record ls | Error: | PMU Hardware doesn't support sampling/overflow-interrupts. Signed-off-by: Vineet Gupta Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: Vineet Gupta Link: http://lkml.kernel.org/r/1462786660-2900-3-git-send-email-vgupta@synopsys.com Signed-off-by: Ingo Molnar --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index f94f164..5d48306 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -9309,7 +9309,7 @@ SYSCALL_DEFINE5(perf_event_open, if (is_sampling_event(event)) { if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) { - err = -ENOTSUPP; + err = -EOPNOTSUPP; goto err_alloc; } }