From patchwork Wed Jul 18 21:48:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 142303 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1022307ljj; Wed, 18 Jul 2018 14:48:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfabwXCsGnyn18hezSvZrurVP5f2u9aKmsyOK0fNman6YRdAg01GuteZ0EW4zrPPBi6G9Ac X-Received: by 2002:a63:dc17:: with SMTP id s23-v6mr7503548pgg.40.1531950498198; Wed, 18 Jul 2018 14:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531950498; cv=none; d=google.com; s=arc-20160816; b=NVVAHhp7iRc7qYnLPMBSBrUNlGHjYikS7tvlr6Y9277F9yeLbKTUGeKBy+BmB34rs/ gtU2dHaguDlx11Y37veMty+u6tq7pxvDh8etfqncQXURH0tbaV7ZkB4XGOAypwVRNu75 vqylNRpoa/kE2ctE1fsqc5SRK/O+QcUrAgt+Zru5vtpnW6+oGZmdXSMHrsgwWJ+ntq8d UFa1/6l2qdR0c6+OjTjIJS9qjedueoEqyj6kP/T5fUFxNbN3HNbi76ohy4D3otLrKai2 dnHLt/1QAj34AkHZk2cbIhqZd239iZfxihnCLdpHMd/VYiPqRBC7bFHCMbeQm8teELif OEYA== 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=ECe1bIK/ZFQwnEXTjDkv2j27k//STaVCtIlh4aDozm2TTP5QPykZhJYq/Ntpfle5hU xkCw8rsc9VS9FSp3mTdEm9+5O93a0vSiUzbo0xvT3fJjgaZQ6pGrEcZdYyT3rq0qiJ81 NaKOsK54D3N1QsH8Wz0MoRXRbhcp8wxe/OtvHAGctwE8FOw/lEzpCjAJzY2mfYcrnhbT qnKLAFBRPYLvK82X/XMHJddg5KECz5EjZugSR2mqO0AOXc9W/qdjZ3Jw0zE8RCpPdXbz agJBwc97naeHcY/mdEvFapKbeABgYKg1S7E7hOJO3gewUUQ3hbNzQNqY2wpMwcvHd8Po xesw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U+vKzZpJ; 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 143-v6si4674416pfa.178.2018.07.18.14.48.17; Wed, 18 Jul 2018 14:48:18 -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=U+vKzZpJ; 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 S1730273AbeGRW2F (ORCPT + 31 others); Wed, 18 Jul 2018 18:28:05 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:55107 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729218AbeGRW2E (ORCPT ); Wed, 18 Jul 2018 18:28:04 -0400 Received: by mail-it0-f66.google.com with SMTP id s7-v6so6291021itb.4 for ; Wed, 18 Jul 2018 14:48:13 -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=U+vKzZpJlQlYHPJlmfZfZONwUe7bQOIGrdw+YxEVhLk1t8p0L9wNAH+GYzJQSPiTZ3 P1y+buF7Kh/q+IeOQXRpGOONg2UjxUNJugY+uPB7utMV3/fdi+qjAa9ZEguVhKTvDOK/ eTk4ljhFqoC/3YyZaDKXyJd8SnWXhnVNI78M4= 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=PrilneLj8aQ4dmaFQevzBebCCzpsc+GkLKiRD1ZwC+roQhGvEcETGN65BUhT7Udvxc wJv5Wm5lSkEas64kWyClum4DOUw4qkaPL3Rty0MxdX+Z1nHRACKd+tYGOVq3T9XwX3AB LUSVuCYMMODhTBo6VltRQlMWmF/E2mq3VSZMdQhuwRm/QZ8shjvDxLTbJfpZz07FfCP2 B4CwhFIR4WtYUpg1UF4jVwdmnUAVvGH1jkjlfXjDViVzcFOYNWgPtXcDr0ImxpsIEA4v YhDdWZrtXtbE/EzHEFRyTn+MRu9uBaPrL37hh2oK0n2JQSnZ2JvKCtXeIi3LkEOAsQzf xlHA== X-Gm-Message-State: AOUpUlFRUo44LhGGc5Bjpk9lh1WUOUL+w19lqX5G66Vls29gzgkUfk67 gXUCv0V1v+j36/4TZmkl7SJGgQ== X-Received: by 2002:a02:105:: with SMTP id c5-v6mr6941852jad.139.1531950493405; Wed, 18 Jul 2018 14:48:13 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id w193-v6sm2093386ita.35.2018.07.18.14.48.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jul 2018 14:48:12 -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, kim.phillips@arm.com, suzuki.poulosi@arm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/7] perf: Introduce ioctl to communicate driver configuration to kernel Date: Wed, 18 Jul 2018 15:48:01 -0600 Message-Id: <1531950487-24554-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531950487-24554-1-git-send-email-mathieu.poirier@linaro.org> References: <1531950487-24554-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,