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: 8645041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9746F9F294 for ; Tue, 22 Mar 2016 20:26:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C65422038A for ; Tue, 22 Mar 2016 20:26:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCB952034B for ; Tue, 22 Mar 2016 20:26:51 +0000 (UTC) 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 1aiSre-000178-AX; Tue, 22 Mar 2016 20:25:18 +0000 Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aiSqY-000891-Dg for linux-arm-kernel@lists.infradead.org; Tue, 22 Mar 2016 20:24:13 +0000 Received: by mail-io0-x235.google.com with SMTP id m184so255399197iof.1 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=SHziv4A6klzPZMNqeB6X3h39oeMvzN42vdXUTQQmMIERQGoBTSV2/n8aFBGxgr3BOH OFbUB1U60Uxn3yA/6PPPpzdV6FXKGbNRYn7iSR1D16DcjEKC7NxBSzZocQ4WuRGXTSP4 YvXwNKq8kxoxCsEXm1orVCFClqRRd/+IiHFqOKlmUkbau7P9Wzd0/h3ARcO1JQW8ygD+ wMwzpRsXAHIyzti76YhjhB2AiBUxH/EvGm21h/6JaWFDCaw14LiBBwxnGSiCf7NVfgR4 QtP3t+/KoJDNtrII0DTqyIKHRAXk4wm/ykyYFZWTh+mhDMKmyhBWkU20NIVYxmxBK5OT M9qQ== X-Gm-Message-State: AD7BkJJ+ZeAsbs+diWwew64/qtevWZkZuUFLIBj/RbncxH1E1qDlz8wdMlkkYM+B+sHrQ/z9 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160322_132410_680062_595AF3CA X-CRM114-Status: GOOD ( 11.89 ) X-Spam-Score: -2.7 (--) 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: linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);