From patchwork Sun Oct 18 18:24:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 55196 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 6BAB722FFA for ; Sun, 18 Oct 2015 18:27:27 +0000 (UTC) Received: by wikv3 with SMTP id v3sf10446439wik.1 for ; Sun, 18 Oct 2015 11:27:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=CCqKpKenELKjD9SHZ/QFq+Bd0WbrtI90t8B3nIh2VyM=; b=Nmhl7Pgr/87CbvCIfJlPwBTFhScsgHrvc6dRNq3C2fbUygBqngJW8ZaNb8iLuwXtKX G8ZYjH8b6um2Roaob69CjX+8OYx5EKMr5+5pcSOtE23BsrsT/Jik0qt1mA4nciqh4m/f +1tZ1/66Zr3WdR7ls8WeCycvYLZIK6aLNwZeQfiLWm/nzVYyDBojxIWnvB14Wl558OkP CxzbzSokPrhGUJGqi/n0zBm0tFX0KpuecK8anS+LT2tJjQQK8P516eRLWkA/yapZgsnC j0sw97PkWG1GJYhkCfuknsbK93L9bzrHH5EQYglnVnAdMk9LYfqovvfusHTpHVp1LwCB 2vmw== X-Gm-Message-State: ALoCoQmsCZC006ERScUaPUOniggANrzf45KIra8S29gGSHUfbYmsGieq4NL8xpfTP3DQFoeKjJh7 X-Received: by 10.180.89.41 with SMTP id bl9mr3218275wib.1.1445192846767; Sun, 18 Oct 2015 11:27:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.146.9 with SMTP id u9ls491495lfd.63.gmail; Sun, 18 Oct 2015 11:27:26 -0700 (PDT) X-Received: by 10.112.166.102 with SMTP id zf6mr12874662lbb.124.1445192846479; Sun, 18 Oct 2015 11:27:26 -0700 (PDT) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id o64si20114167lfe.117.2015.10.18.11.27.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 11:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lffz202 with SMTP id z202so15144019lff.3 for ; Sun, 18 Oct 2015 11:27:26 -0700 (PDT) X-Received: by 10.25.86.213 with SMTP id k204mr8270726lfb.36.1445192846349; Sun, 18 Oct 2015 11:27:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1078294lbq; Sun, 18 Oct 2015 11:27:25 -0700 (PDT) X-Received: by 10.66.147.104 with SMTP id tj8mr29516900pab.125.1445192845323; Sun, 18 Oct 2015 11:27:25 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id dz5si46452816pab.108.2015.10.18.11.27.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 11:27:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Znsf0-00053i-RP; Sun, 18 Oct 2015 18:26:22 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Znsea-0004ko-3q for linux-arm-kernel@lists.infradead.org; Sun, 18 Oct 2015 18:25:57 +0000 Received: by padhk11 with SMTP id hk11so6277050pad.1 for ; Sun, 18 Oct 2015 11:25:39 -0700 (PDT) X-Received: by 10.68.103.2 with SMTP id fs2mr3918175pbb.123.1445192739062; Sun, 18 Oct 2015 11:25:39 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [184.64.168.246]) by smtp.gmail.com with ESMTPSA id hq1sm20402076pbb.43.2015.10.18.11.25.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Oct 2015 11:25:38 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org, a.p.zijlstra@chello.nl, alexander.shishkin@linux.intel.com, acme@kernel.org, mingo@redhat.com, corbet@lwn.net, nicolas.pitre@linaro.org Subject: [PATCH V2 06/30] coresight: clearly labeling source operarions Date: Sun, 18 Oct 2015 12:24:23 -0600 Message-Id: <1445192687-24112-7-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445192687-24112-1-git-send-email-mathieu.poirier@linaro.org> References: <1445192687-24112-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151018_112556_313322_BEE484FD X-CRM114-Status: GOOD ( 15.01 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.220.54 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.54 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: al.grant@arm.com, mathieu.poirier@linaro.org, pawel.moll@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, tor@ti.com, mike.leach@arm.com, zhang.chunyan@linaro.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mathieu.poirier@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 When integrating coresight with Perf, it is important to clearly identify which operations are used by sysFS and which ones by Perf. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm3x.c | 8 ++++---- drivers/hwtracing/coresight/coresight-etm4x.c | 8 ++++---- drivers/hwtracing/coresight/coresight.c | 8 ++++---- include/linux/coresight.h | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index 713ffe1b761f..3d7fa0b2acf9 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -346,7 +346,7 @@ static int etm_trace_id(struct coresight_device *csdev) return etm_get_trace_id(drvdata); } -static int etm_enable(struct coresight_device *csdev) +static int sysfs_etm_enable(struct coresight_device *csdev) { struct etm_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); int ret; @@ -407,7 +407,7 @@ static void etm_disable_hw(void *info) dev_dbg(drvdata->dev, "cpu: %d disable smp call done\n", drvdata->cpu); } -static void etm_disable(struct coresight_device *csdev) +static void sysfs_etm_disable(struct coresight_device *csdev) { struct etm_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); @@ -436,8 +436,8 @@ static void etm_disable(struct coresight_device *csdev) static const struct coresight_ops_source etm_source_ops = { .trace_id = etm_trace_id, - .enable = etm_enable, - .disable = etm_disable, + .sysfs_enable = sysfs_etm_enable, + .sysfs_disable = sysfs_etm_disable, }; static const struct coresight_ops etm_cs_ops = { diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 254a81a4e6f4..0808cc5a51a0 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -180,7 +180,7 @@ static void etm4_enable_hw(void *info) dev_dbg(drvdata->dev, "cpu: %d enable smp call done\n", drvdata->cpu); } -static int etm4_enable(struct coresight_device *csdev) +static int sysfs_etm4_enable(struct coresight_device *csdev) { struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); int ret; @@ -231,7 +231,7 @@ static void etm4_disable_hw(void *info) dev_dbg(drvdata->dev, "cpu: %d disable smp call done\n", drvdata->cpu); } -static void etm4_disable(struct coresight_device *csdev) +static void sysfs_etm4_disable(struct coresight_device *csdev) { struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); @@ -261,8 +261,8 @@ static void etm4_disable(struct coresight_device *csdev) static const struct coresight_ops_source etm4_source_ops = { .trace_id = etm4_trace_id, - .enable = etm4_enable, - .disable = etm4_disable, + .sysfs_enable = sysfs_etm4_enable, + .sysfs_disable = sysfs_etm4_disable, }; static const struct coresight_ops etm4_cs_ops = { diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index a3dcafb81700..d318a338a517 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -212,8 +212,8 @@ static int coresight_enable_source(struct coresight_device *csdev) } if (!csdev->enable) { - if (source_ops(csdev)->enable) { - ret = source_ops(csdev)->enable(csdev); + if (source_ops(csdev)->sysfs_enable) { + ret = source_ops(csdev)->sysfs_enable(csdev); if (ret) return ret; } @@ -228,8 +228,8 @@ static int coresight_enable_source(struct coresight_device *csdev) static void coresight_disable_source(struct coresight_device *csdev) { if (atomic_dec_return(csdev->refcnt) == 0) { - if (source_ops(csdev)->disable) { - source_ops(csdev)->disable(csdev); + if (source_ops(csdev)->sysfs_disable) { + source_ops(csdev)->sysfs_disable(csdev); csdev->enable = false; } } diff --git a/include/linux/coresight.h b/include/linux/coresight.h index a7cabfa23b55..97155527dbdd 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -205,15 +205,15 @@ struct coresight_ops_link { /** * struct coresight_ops_source - basic operations for a source * Operations available for sources. - * @trace_id: returns the value of the component's trace ID as known - to the HW. - * @enable: enables tracing for a source. - * @disable: disables tracing for a source. + * @trace_id: returns the value of the component's trace ID as known + to the HW. + * @sysfs_enable: enables tracing for a source, from sysFS. + * @sysfs_disable: disables tracing for a source, from sysFS. */ struct coresight_ops_source { int (*trace_id)(struct coresight_device *csdev); - int (*enable)(struct coresight_device *csdev); - void (*disable)(struct coresight_device *csdev); + int (*sysfs_enable)(struct coresight_device *csdev); + void (*sysfs_disable)(struct coresight_device *csdev); }; struct coresight_ops {