From patchwork Mon Dec 3 22:54:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 10710873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82F9E109C for ; Mon, 3 Dec 2018 22:55:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 725152A473 for ; Mon, 3 Dec 2018 22:55:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 665FF2A498; Mon, 3 Dec 2018 22:55:48 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 0B7B52A473 for ; Mon, 3 Dec 2018 22:55:48 +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:References: In-Reply-To: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:List-Owner; bh=egicnP7YvaWN2t7BTruTyP67l5z07CW6lcyvM/+P04w=; b=adiscugyXvbTOYo4lSvKbg2xnj jlr217DC6xhJfYtszJVz1Dh23px2/1L8gv7K24i9GH8PMHYv/iuVOTWbskeFBua1MFFJpUCoe55lQ 3KtSRv8HctSqW0QWZPYf4LnHbaBppDQZzYRcycMhARXwFzTt/CO1xboQwFLswzDRJPlBYYY05DqkJ 7QtoVDHq9u5/cAUh5LRvX2cznSGbNCnesnHh+1FL+8VT5WDTbut9n0Bf4sv/E2N5/OMmYSUh++kMI iFSF0pVD5QPJAtGqKD4QiiGbMXrOxnEPdj4Qcjn+HcieAFniw0PRvWtcWLiTtN6u8bdPXnrCjqCf9 Cbi+qShg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTx7r-0003NM-PE; Mon, 03 Dec 2018 22:55:39 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTx7Q-0001df-4Q for linux-arm-kernel@lists.infradead.org; Mon, 03 Dec 2018 22:55:13 +0000 Received: by mail-pf1-x444.google.com with SMTP id w73so7127572pfk.10 for ; Mon, 03 Dec 2018 14:55:01 -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=EjQUylK1BINMhHoByAtjuUYcrcMPz4Z0p6OJ+UuyZ4XGwa+b2BF+8GhR4rNhzouffc mxtwzG+5pp32+g9gzo0/5BWnQBltZmNyjF/k4csDBe6E7LE39h4e5Bg9/qk5gXu5+tS5 WqkbqVCttjr8cVwi7C7sKHvcIng56MShKw1lQ= 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=OcioYdIPaxwJP/o4+5hXLCzYEVjSPF8lOuwQhXs7qPKtvo1pDiHngMB3+fuPuMmzUY yCUIk5GBl4Jg6RQTmUeBLgEy1j/L47ZDkgOt0YwVJ/sefuzAS/HgkA+bzNhPFcydfjdf osSgEVecTeZ4tem1LJ3e2LCN6GRBNnRbXsYssYlv1vyJBP/HG1itJzomojiDRbU4ts+Z NVfsWwAB1JkS1CkykRmpzysOU12iTvXsdjhnyoWO9XOTf4ygOOpiACtNBprxpOlZEujQ 8OxrRlvJQDx+39itRGG/eC/8mVD8zlS3LwzV9L1WQ/2G21nW/Pzy6DMs1rx/Ox1tzkPO lhwg== X-Gm-Message-State: AA+aEWbw7Bhf8DoTH61ipsp1LYxeOkq3Qr8ffYc6wHQA78OhbvSSAJhL t72PByEGwDFfmNLYbZoLhh9Fjg== X-Google-Smtp-Source: AFSGD/W2uitOqwtZyRgEp69Oct5X66ejR/jdnhNPOl3ADOFr7Hmb+LFYZdgdxrvfSUultDolEFAudw== X-Received: by 2002:a63:e5c:: with SMTP id 28mr2608108pgo.369.1543877700608; Mon, 03 Dec 2018 14:55:00 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id v9sm20933057pfg.144.2018.12.03.14.54.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Dec 2018 14:55:00 -0800 (PST) From: Mathieu Poirier To: acme@kernel.org, peterz@infradead.org, gregkh@linuxfoundation.org Subject: [PATCH v5 1/6] perf: Introduce ioctl to communicate driver configuration to kernel Date: Mon, 3 Dec 2018 15:54:51 -0700 Message-Id: <1543877696-17174-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543877696-17174-1-git-send-email-mathieu.poirier@linaro.org> References: <1543877696-17174-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181203_145512_323370_12CC9CE0 X-CRM114-Status: GOOD ( 12.31 ) 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.rutland@arm.com, linux-s390@vger.kernel.org, alexander.shishkin@linux.intel.com, will.deacon@arm.com, heiko.carstens@de.ibm.com, adrian.hunter@intel.com, ast@kernel.org, mingo@redhat.com, linux-arm-kernel@lists.infradead.org, hpa@zytor.com, schwidefsky@de.ibm.com, namhyung@kernel.org, tglx@linutronix.de, suzuki.poulosi@arm.com, jolsa@redhat.com, linux-kernel@vger.kernel.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 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(+) 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,