From patchwork Thu Jul 5 22:13: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: 141231 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2427576ljj; Thu, 5 Jul 2018 15:14:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfeylPrjVIfCXOhhxYLjbXoT3lEKBW1Y0fAFyEscziXD92LcczyJcKsOZqnl4X0B2gWY0EH X-Received: by 2002:a63:9741:: with SMTP id d1-v6mr6967369pgo.403.1530828841322; Thu, 05 Jul 2018 15:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530828841; cv=none; d=google.com; s=arc-20160816; b=A1lvP2EnCoy+FhmPuBUKX38eO3mgtm8fF920Ue8dYNS/UA23USsgaBPRYlnqzvHkp9 HTQHjEFlTLZiWTd2zBGi85dv1yeNJJovv+5vd0wHJLrbIFIzA79vCLeWP1Aa04MxmqZi JNa24Y4nmx7MAZEmV2YlJjQ7aXqrVTB51TAY6vo1zOiv5Y82Z8ck9Ud9ojGQW59dtiDV +JUUFtMl1yUg9bSiVdQG3aCTbYBa4mVJ4qGQAEsP/Rh/AaMeYyrg02NrB9mV8qZrZ8fJ 1o3k7y1CZ3e3aNWx5nDp63AbAyAkaKLR2kULx+70mGDueKEs7MjgUE/wJCrXmQfwphbj z1ig== 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:arc-authentication-results; bh=b+RIY2UuP5aJSr2EjMCmde75UASQQURVa37fsARUKY8=; b=ldy0aXKde/8eV/7ipDJfRG/tyA7ZgVVezNDqh7gw7+4gmjoJ+IPQJKX/Nbg/IEkn/h HAgDaraF+hf0SISq6DNd1RD5BowAIPv+s5UmPFIEUXdOFoABfVayJDE+kdqr84K3zpek eQXefNvl8qRDrDJqdc4vbK2PMs5SiI5xit6j6Tj5e4PvXOasBrgEToXFMI3vXq9SdcSc TeZuYTvApmfkjyuK9JY/v0eLfp9aHDpyxqYfgvAsy4mOuod2Eyq8GMbqzLJI5JjTtSPS FsuObyjLk4YGrf9UnvxdF2PmGJ0UrTDKl0k3uHLXtNojD3YjrVLv39uE+HQ/dSVSbTX+ 83fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gI1CBvT0; 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 q35-v6si5198613pgb.219.2018.07.05.15.14.01; Thu, 05 Jul 2018 15:14:01 -0700 (PDT) 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=gI1CBvT0; 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 S1753680AbeGEWN4 (ORCPT + 31 others); Thu, 5 Jul 2018 18:13:56 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:44349 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753549AbeGEWNx (ORCPT ); Thu, 5 Jul 2018 18:13:53 -0400 Received: by mail-pf0-f196.google.com with SMTP id j3-v6so6570312pfh.11 for ; Thu, 05 Jul 2018 15:13:53 -0700 (PDT) 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=b+RIY2UuP5aJSr2EjMCmde75UASQQURVa37fsARUKY8=; b=gI1CBvT0BGibui7weucnBH3LCNGfiFEjOcmvqibEyCvMl054ZdQ2jCwPU/yu/2WJZc FkiB0FAfNtJC+uDKXMgMewYa20cNphm0HasaoZWNHabHHW+ZtOygyNGptShiaiO1AtWU YU5EwYNMBNv4BlYiIPHcoi2v5deJ3VoGN/I9U= 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=b+RIY2UuP5aJSr2EjMCmde75UASQQURVa37fsARUKY8=; b=HJWrEKz+x0IXzfecCowWUtkjKRY+JOd76AAYn6/wM0Cq8+jMPxBAV6TkGEU6hDAvVf cijMykXIx9yCO+mwSjpz/nCkvn2n43irTGR5hQmH1PuAM7mZYdwGDlhi8YNmcNoFGx2d OoYKQtRT+eGUbsacncQpvIGE+oQ/tvX4WSawUiEb3J05qKNKcORQoJbtcTKI78e4/BSI 3x1ieDOhWOg/9ZCgGufxz94zrIApaibPtS/ptcxeDL0Jvo14BgFO5LKTsu2xGURBcYdn occtdccdcq6tsn8+52TlSSOWcsMfn8CGKp4/of7LGv4NVIxb0cJy7KrHskASuNr2yn+U XTYw== X-Gm-Message-State: APt69E04mBbkQ1Ui9MZeWvMqdyoXWnldOaOvu56mzh0evNEiN+M31oM/ Kdt42bd18xIgZxiEEwzJ9LgS1oioQ5o= X-Received: by 2002:a63:82c7:: with SMTP id w190-v6mr7128829pgd.253.1530828832914; Thu, 05 Jul 2018 15:13:52 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id r89-v6sm13297486pfa.75.2018.07.05.15.13.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Jul 2018 15:13:52 -0700 (PDT) From: Mathieu Poirier To: peterz@infradead.org, acme@kernel.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, gregkh@linuxfoundation.org, hpa@zytor.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/7] perf: Introduce ioctl to communicate driver configuration to kernel Date: Thu, 5 Jul 2018 16:13:41 -0600 Message-Id: <1530828827-11604-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530828827-11604-1-git-send-email-mathieu.poirier@linaro.org> References: <1530828827-11604-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 b8e288a1f740..b5b3241877df 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -460,6 +460,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 b8e288a1f740..b5b3241877df 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -460,6 +460,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,