From patchwork Wed Nov 28 22:01:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 10703439 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 3826F14E2 for ; Wed, 28 Nov 2018 22:02:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 288F32DE94 for ; Wed, 28 Nov 2018 22:02:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BDB92DF0D; Wed, 28 Nov 2018 22:02:01 +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 AC5522DF06 for ; Wed, 28 Nov 2018 22:02:00 +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=MHLAHOHA37CpZSbuII9TpjQVq1pH36+xEH6K6NHRjTc=; b=JXVsOZpOoETaGz06qoeJn5+Y3K c8wDCUhnITJO6xBfOhUFIwDxIJBt09RlUFAgOAIKO8fTbBGM42isCovZMGMMJ7K4IPwj0ldT3aRMp 5H5cj6H4WlA2Ih52keunN482TRKZlflBGGNf+umLj9OK5apIyBHc1IYKKGspI4ruoyPXRkjmEZ7Z1 NozJqqKcLOkQIcOqgtGk6OISbWG6XJl2xlmlJ2IunAY9MuZyM01EkLeHrlNq3/63nsGyR92TSdV6Q QaOBgqvy7xUXoZ76XOiVugZ8KZ3LkD5nXwoVHTJ9HCThbM9BqNVebeY99eDG6zJsBOMY7PDWKt6wU eiOoA9bg==; 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 1gS7u5-0000CF-31; Wed, 28 Nov 2018 22:01:53 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS7tk-0008IU-MQ for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 22:01:34 +0000 Received: by mail-pg1-x543.google.com with SMTP id 80so10109919pge.4 for ; Wed, 28 Nov 2018 14:01:22 -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=eueZ6W2njB74JvX/8hNBYwCtCguZgj9QXyJ/Slfihak=; b=IqXuzvI8sZmoSzDTRIroeYklOjkcok3XwjvmzBpMLij3wxHT3C8rlZx3taYzRctJvA RlVvxw5cmlLiYERph2+vXCyd1VH2ymbssjgiwRzuCOlQMsLo/A02Ey5ajzFE5Kw1eEZe JpmIed5MQ13g1k6EbXX1/U11Pb71l3goGBy4w= 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=eueZ6W2njB74JvX/8hNBYwCtCguZgj9QXyJ/Slfihak=; b=Psbwo4+quD/eJzQ+ZtcdBWdgRsXSsOY9N3j7ZeZIzS9+is/yvxxLOnT57xo15rTLYz Ye8y2p9r99naMH7+9/TXgWKbBtf00HXUwsnUNEMub0S48gDXkRxdyjd81+WGJlOuCzUz 64VsxVunuiGxu7DaOaPuSEviyEgxnpHnObRbC58cRkogLNtEKUqBxEb8Joe8B0bLNZSr 6Fio6x8zR7E8o1VXGXzqFGngVBct4qSydDg6ppFi3hsnfeyDcs/iFJfSPy/V8/9YgZrQ akK6kpmImZ8SH5yg6DaCNEylbqQeU5K692uzhq3E8NapQ9uY4c/DIw4Jc2tlKlB1N7Z9 WSjw== X-Gm-Message-State: AA+aEWZ1sRwdtzxGBZmGPxMFyJTknzmuJoLRPSJt9+S3dsKPH63WN/6y inWS1x/5Lb74kFFGP7GNiSmPvQ== X-Google-Smtp-Source: AFSGD/VnF+Koox+jTKg7BiF0OedimZ7VaGXUSUkkQ/2PVKM5eNFqMPdTsT8Ym5LUO182rDDnRVIwTw== X-Received: by 2002:a63:8c2:: with SMTP id 185mr35273310pgi.26.1543442482168; Wed, 28 Nov 2018 14:01:22 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id 12sm8698051pgd.35.2018.11.28.14.01.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Nov 2018 14:01:21 -0800 (PST) From: Mathieu Poirier To: acme@kernel.org, peterz@infradead.org, mingo@redhat.com Subject: [PATCH v4 1/6] perf: Introduce ioctl to communicate driver configuration to kernel Date: Wed, 28 Nov 2018 15:01:13 -0700 Message-Id: <1543442478-31465-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543442478-31465-1-git-send-email-mathieu.poirier@linaro.org> References: <1543442478-31465-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_140132_726570_B257B2ED X-CRM114-Status: GOOD ( 11.43 ) 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, hpa@zytor.com, heiko.carstens@de.ibm.com, adrian.hunter@intel.com, ast@kernel.org, suzuki.poulosi@arm.com, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, schwidefsky@de.ibm.com, namhyung@kernel.org, tglx@linutronix.de, 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..bb558caeb33b 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, char *) 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..bb558caeb33b 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, char *) enum perf_event_ioc_flags { PERF_IOC_FLAG_GROUP = 1U << 0,