From patchwork Mon Dec 17 17:21:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 154025 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2716073ljp; Mon, 17 Dec 2018 09:22:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/VHdOUOWu6c9iCq6AJ6qd0UboA1qTCXLW4gvynf/oPXc6K3byDYYeWraw/KMLMikmqwfDn3 X-Received: by 2002:a63:990a:: with SMTP id d10mr12950271pge.279.1545067321803; Mon, 17 Dec 2018 09:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545067321; cv=none; d=google.com; s=arc-20160816; b=Imksa9vU2PhFt6eUpf+EXIy+5p+hIvv3max6I61YN8WpHiRk9s4ZSc1bz1EUQh5sAt nyuasl+5S/I1TPte/1VLFp3w2JJowXKQbo+QVwAJBMZKla56fKRBpD1ZoZWRFV+e/5Br fo1bHTlx8j0BqD4ke2VRq95IKgQgxEolL2SVpy9qNhFoqUFIVAKURNY2JAUY1iRBXyYC KS443fJT5n2w7hQaBLpCquQLpdAZCqROukLq4PxNohfqCWva3BfHdupjdjjq2H62EYVS +AQASLqrywXGIOHEunpr90rDkLz7EZpVm3rV8+UHVVzmiBfD4JNiBG4/u5f807eainy+ o+6g== 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:dkim-signature; bh=m66nW8iS1E+go7FhvR8iwCr/rCMmVZB6DxxcxVV5OJA=; b=hZPeMAzOYYfTPOMfvTgpfhy17QezuP5FdIlb5jsit9ciIrgE91f7OrYzDjdM2cz18O r7/WKSDl4ApgGzSNGW9C1ne1A8aN9yqnerPiWNCOVEd1zWkYIjvHzjT0+7bRHPJBAw/G UBqylof/sG8+HcDCTNn0peoSVvXZKDROIkhHhvm2OwcM8s0n0oLQu98aSN9a86OIwdxM Qwk/JN7GgecXGAT7vzAzqoDJj5J8QCpDjoa1ZVgluocWcM0Bb+GNT/CEBlVBk+upPn3t DgqLqMyIJEQ61ROPG8kgWCXcUbF3SjFCHTeJhh1jf5Mifu/6TcA7mgWxKRHetYDAmTqC FjXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jUvOrxtH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l66si11943562pfi.5.2018.12.17.09.22.01; Mon, 17 Dec 2018 09:22:01 -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; dkim=pass header.i=@linaro.org header.s=google header.b=jUvOrxtH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388374AbeLQRV7 (ORCPT + 31 others); Mon, 17 Dec 2018 12:21:59 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38547 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388299AbeLQRVv (ORCPT ); Mon, 17 Dec 2018 12:21:51 -0500 Received: by mail-pg1-f196.google.com with SMTP id g189so6427518pgc.5 for ; Mon, 17 Dec 2018 09:21:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=m66nW8iS1E+go7FhvR8iwCr/rCMmVZB6DxxcxVV5OJA=; b=jUvOrxtHlUgY/BFT4v3ZK6gRAks785QtJRvw46Ep6IRQVOgDtruq4cxZlhLqUy+z1T PMFlT99Q/QaWBntvS9KUjESXmSD26TxOwa91kqwylbOHv2NZUuW19Pg2YICcEl5lSy9f 8pcK3qsHFRwG7jQRlZjsinIo2nFdnH1gvNWg8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=m66nW8iS1E+go7FhvR8iwCr/rCMmVZB6DxxcxVV5OJA=; b=MLJROg8fbqp4GbfacShWvNWYgBVED0QzOz/EiKlPax5pdkv4olfRhU2jTPHVupJbuH Wv3KhQSM5WCyYgBrsCpFYs4Cso84KRqC1dWi9bbBePdftcWN4uYYhHROUMmd6T3FHtZg v1akBBwRL3narj3Yz4n5Wn1DkGCopNSFIGtP/FqW8w2tllEv3Fo8FdXfNqgp0e03h0Gj KkHFhGcYMzXXSzOu6qIxV7w/+w29Syz7xfUuTvJNQXyz/xLMpS+4wEZpvx8ZWHuAlaQo awFK9yQN9fn80YR3sNncbXuXnrK6x0b7U51Rzrd4jeY7EQDLEtTNf6UUL8rDEXHuIwXN CFyA== X-Gm-Message-State: AA+aEWYK6WOBv9AD0HmgbOB515lbFlwqiI0acBGyw8hz8GIDI9rZD6Y9 0JDE7Ep4evW9QnMg0bP3G5BU0g== X-Received: by 2002:a62:7086:: with SMTP id l128mr13520574pfc.68.1545067311075; Mon, 17 Dec 2018 09:21:51 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id j6sm20526648pfg.126.2018.12.17.09.21.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Dec 2018 09:21:50 -0800 (PST) From: Mathieu Poirier To: acme@kernel.org, peterz@infradead.org, gregkh@linuxfoundation.org Cc: mingo@redhat.com, tglx@linutronix.de, alexander.shishkin@linux.intel.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, will.deacon@arm.com, mark.rutland@arm.com, jolsa@redhat.com, namhyung@kernel.org, adrian.hunter@intel.com, ast@kernel.org, hpa@zytor.com, suzuki.poulosi@arm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH v5 1/6] perf: Introduce ioctl to communicate driver configuration to kernel Date: Mon, 17 Dec 2018 10:21:41 -0700 Message-Id: <1545067306-31687-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545067306-31687-1-git-send-email-mathieu.poirier@linaro.org> References: <1545067306-31687-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding a new IOCTL command to communicate PMU specific configuration to PMU kernel drivers. This can be anything a PMU might need for configuration that doesn't fit in the perf_event_attr structure, such as the CoreSight sink to use for a session. Signed-off-by: Mathieu Poirier --- include/uapi/linux/perf_event.h | 1 + tools/include/uapi/linux/perf_event.h | 1 + 2 files changed, 2 insertions(+) -- 2.7.4 diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 9de8780ac8d9..a39d8dc2e7a9 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -462,6 +462,7 @@ struct perf_event_query_bpf { #define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32) #define PERF_EVENT_IOC_QUERY_BPF _IOWR('$', 10, struct perf_event_query_bpf *) #define PERF_EVENT_IOC_MODIFY_ATTRIBUTES _IOW('$', 11, struct perf_event_attr *) +#define PERF_EVENT_IOC_SET_DRV_CONFIG _IOW('$', 12, __u64 *) enum perf_event_ioc_flags { PERF_IOC_FLAG_GROUP = 1U << 0, diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 9de8780ac8d9..a39d8dc2e7a9 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -462,6 +462,7 @@ struct perf_event_query_bpf { #define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32) #define PERF_EVENT_IOC_QUERY_BPF _IOWR('$', 10, struct perf_event_query_bpf *) #define PERF_EVENT_IOC_MODIFY_ATTRIBUTES _IOW('$', 11, struct perf_event_attr *) +#define PERF_EVENT_IOC_SET_DRV_CONFIG _IOW('$', 12, __u64 *) enum perf_event_ioc_flags { PERF_IOC_FLAG_GROUP = 1U << 0,