Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1165755imm; Tue, 3 Jul 2018 06:41:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeZwFNeLZMPjWGualBDtNQvejooBIRvRuWUHfkJL6p0tOON6cnJHMRBvil7ZR1usJkrbRJd X-Received: by 2002:a63:161a:: with SMTP id w26-v6mr4912433pgl.257.1530625301081; Tue, 03 Jul 2018 06:41:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530625301; cv=none; d=google.com; s=arc-20160816; b=tL0eohcuTp72ZWEXs5zlu8ydp0MPKV29F0Fxdmyu2RHPB2H2b5C9pZsu8BIKvQ8+Iu O4xP0HNt/3nGJuN0MejtOP+UZXK7XPbOJNlF+gXdjr/tR3XC5luNtbpK+yQDiz/1LSWS YpUXetSg9y6rV3c1FC4BCQZXVNSfIO5AK7IAomDX929GFqJOuu1mVKYvbUVQd4foYpe4 UYGnxVRcdrGOEal+BfZCNMlBipsk6datrkm6PR3mZh1v4xWZJGRSMZNiEU4et9Q0P4Lk cpXSpsk9i8kWxvf8L2lPfXyz39odUX5gkFGkzwqsWLbCgXtLt7N295gNfSyDyU+Gk0D/ H9XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=+F3d7TX+BrMwoAA9sHve7TQeFSJSK1UXid5kA1voK8I=; b=gOFk8aHr+f0SZMjEghmRvkX3pQ8sFSEkC3dWEkrL2+mWxjZl22IAn2MAamNog9CLOF TB59nrmNplSCYNcCxHrmntpCcoLTYHyx2Ss0PV0+J2kKDaDM6IDZvwKzZlJEongzrpi+ 3NKuipuYO2ewOx3ErAIYfDgwifrPNXXaC2IXflyQEWU+snDphb7s96BnH/gfctnpcjqs 13LOUqpcol2DfO3bSn59OQ6goiEYkN4cjgHnqwT3TpceSxL36s9NN8MLbk5iKus0n/91 AJMRP34so1IBfivw7w3HXDYsJ37A8Q2mQkrUrYSBp3O9Oc9eAj1g/qk1AKI81Jtej/qt yLNw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si1171711pll.412.2018.07.03.06.41.26; Tue, 03 Jul 2018 06:41:41 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbeGCNkc (ORCPT + 99 others); Tue, 3 Jul 2018 09:40:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35600 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752508AbeGCNka (ORCPT ); Tue, 3 Jul 2018 09:40:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5016240122BF; Tue, 3 Jul 2018 13:40:30 +0000 (UTC) Received: from krava (unknown [10.43.17.196]) by smtp.corp.redhat.com (Postfix) with SMTP id 945F52026D76; Tue, 3 Jul 2018 13:40:27 +0000 (UTC) Date: Tue, 3 Jul 2018 15:40:26 +0200 From: Jiri Olsa To: Mathieu Poirier Cc: peterz@infradead.org, acme@kernel.org, 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, 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: Re: [PATCH 5/6] perf/core: Use ioctl to communicate driver configuration to kernel Message-ID: <20180703134026.GA3728@krava> References: <1530570810-28929-1-git-send-email-mathieu.poirier@linaro.org> <1530570810-28929-6-git-send-email-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530570810-28929-6-git-send-email-mathieu.poirier@linaro.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 03 Jul 2018 13:40:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 03 Jul 2018 13:40:30 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jolsa@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 02, 2018 at 04:33:29PM -0600, Mathieu Poirier wrote: SNIP > +static int > +perf_event_process_drv_config(struct perf_event *event, char *config_str) > +{ > + int ret = -EINVAL; > + void *drv_data; > + > + /* Make sure ctx.mutex it held */ > + lockdep_assert_held(&event->ctx->mutex); > + > + /* Children take their configuration from their parent */ > + if (WARN_ON_ONCE(event->parent)) > + goto out; > + > + drv_data = event->pmu->drv_config_validate(event, config_str); > + if (!drv_data) > + goto out; what's this check for? doc does not mention that, also the coresight callback does not return NULL jirka