From patchwork Tue Mar 22 20:23:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 64200 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2294889lbc; Tue, 22 Mar 2016 13:24:17 -0700 (PDT) X-Received: by 10.66.191.202 with SMTP id ha10mr57296558pac.8.1458678255172; Tue, 22 Mar 2016 13:24:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10si4408803pas.64.2016.03.22.13.24.14; Tue, 22 Mar 2016 13:24:15 -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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbcCVUYF (ORCPT + 29 others); Tue, 22 Mar 2016 16:24:05 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:36445 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752685AbcCVUXy (ORCPT ); Tue, 22 Mar 2016 16:23:54 -0400 Received: by mail-io0-f174.google.com with SMTP id 124so103063118iov.3 for ; Tue, 22 Mar 2016 13:23:52 -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=Wni8ynSPCZTXP83SnRyqejDIt1k7tIxFoENujBML+7o=; b=YcsvDYPKJmPzmvFqhLzWX/r1jCtgNNn1bRI4qPXM33FILcTLb6V52dQxWHhWgFrSrJ se3VmRIUHsqhbKgELfzLZQyX4PDunzTb4oHKJgB8rrpnhbTDK27ml8DWUk/m8hniyrro ZziS7SgMxniFg1XmAp56Om9cpyQQWFZozu7AY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Wni8ynSPCZTXP83SnRyqejDIt1k7tIxFoENujBML+7o=; b=bwEwg5N4Mg+yQoztxkFF0BvAMU5uIczwR5CSdVwPwSYJfuVheaIJaFgyQd3rFyEBQN Yw9SfpwUFcYioVDh54rwg/t8GIpbZQDsiFlo0C8/iYlpG3eBdES13nTNcLQtmENsTYR9 jRMwRbiO02Pr0Bi4ustWRdTefyQphXnhq2NbSYeHj2egJdqE/pAzhocxs99GTycJXVaM pDlQ9Z68Zze1BTDDu2F1hH1/1Cwgt33IeQPGGjah4vp7VInroWiukCys/aTJL/LEAYQ4 19El9wleqGuzIkZlflI+KdRgT/xDWKQ0NaKtMmXmZNLfFrzwfoeh277LUa4f72YDyNGr 17/A== X-Gm-Message-State: AD7BkJKC9bRYs1ilPUAqmNdDbYdX4XWyNFzwFFPUykiJ/HHh3T6SPpDhOCv6ymC2FHFg8uZi X-Received: by 10.50.80.74 with SMTP id p10mr21025915igx.46.1458678231966; Tue, 22 Mar 2016 13:23:51 -0700 (PDT) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id xo2sm8092061igb.0.2016.03.22.13.23.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Mar 2016 13:23:50 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 07/14] coresight: tmc: making disable function reusable Date: Tue, 22 Mar 2016 14:23:15 -0600 Message-Id: <1458678202-3447-8-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458678202-3447-1-git-send-email-mathieu.poirier@linaro.org> References: <1458678202-3447-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 When disabling a TMC in any mode it may not be automatically desirable to read the content of the trace buffer. It is the case when operating in Perf mode where the content of the trace buffer is dealt with prior to the TMC being disabled. As such moving the tmc_etb/etr_dump() functions out of the disable_hw callback and into the current sysFS interface. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.1.4 diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c index 789384be81b6..f9749924a055 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -76,7 +76,6 @@ static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata) CS_UNLOCK(drvdata->base); tmc_flush_and_stop(drvdata); - tmc_etb_dump_hw(drvdata); tmc_disable_hw(drvdata); CS_LOCK(drvdata->base); @@ -139,6 +138,7 @@ static void tmc_disable_etf_sink(struct coresight_device *csdev) } tmc_etb_disable_hw(drvdata); + tmc_etb_dump_hw(drvdata); drvdata->enable = false; spin_unlock_irqrestore(&drvdata->spinlock, flags); diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index e1b43e0bd1dd..67e7d5dd891f 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -75,7 +75,6 @@ static void tmc_etr_disable_hw(struct tmc_drvdata *drvdata) CS_UNLOCK(drvdata->base); tmc_flush_and_stop(drvdata); - tmc_etr_dump_hw(drvdata); tmc_disable_hw(drvdata); CS_LOCK(drvdata->base); @@ -112,6 +111,7 @@ static void tmc_disable_etr_sink(struct coresight_device *csdev) } tmc_etr_disable_hw(drvdata); + tmc_etr_dump_hw(drvdata); drvdata->enable = false; spin_unlock_irqrestore(&drvdata->spinlock, flags);