Received: by 10.192.165.148 with SMTP id m20csp4713703imm; Tue, 1 May 2018 02:19:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqu6Rrk/s8TVJhKWv/KNnF4kCxRK1s6WyhLdPjq4LONLx9AeDkzZcw1bUIVqgVfcTNX03e8 X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr15643813plo.72.1525166368159; Tue, 01 May 2018 02:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525166368; cv=none; d=google.com; s=arc-20160816; b=NBXKOHkNgiR9g5M8Fu2cmQbkM6byBwzleYvNelHHS6ZQZekrxY1m1nX36JJj1EoOCX lMkW8wBCDmA1qXpHmxRegr9HByvXl6lp1e6WCUD/BqfVsAnVrpJbxeC5qltw0WKwUS0d DjMCXg9S3PWAPsMHbHFPgfiNeO3uNITK9Srx4Am1oX6GGlZ5B/T2n8oztZXoKKiBilJY oIF6/frJBO2RjfElcBsM8NrrkTy5bcOhxPQ1O5105vnAG6aI6vjbFqAeM1nPZgGXpepa QIohVufJDfRhnemmzXNp+KnUmLo02Fy+6wwrt4UBwqA23k7moNNPqLYgT8BItr1XA2Eo T+bQ== 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:arc-authentication-results; bh=kcXxxBK0TjCJEUpkwPAH3TKA9Hd2gSDtdBQcxWTD/I0=; b=Oi0SGLpdx8NKll1e+2szHvu8bAzwdxBa+DmPdXCIryDrAIfIaT0/4rLyCH3wNlVJAt LHw6zxCsX1997FyUhiiz1OZ2uDbcnJoNpRLDGCNMssgEQR1nKIIWjGsooIAD4Zwfumix y2CkoDU8TqSWRpRj4RhUO/KxX+v4pl8A+CrGW7KDpaxC/6/xoQOd327DYc+9ix0d4eRT uOkYbtb+zDhUqQQme3eRHRYhY6YmezgPMAaRdVIwrtXjsqAqR+ERbmqsGQGJx+EtTtrD jIw8e+tyU8EC/tVGZVB+eNuDt0f7VSFEuVXan2lZDhXCSLQe8pglIeZ/lIvLeTyZF/3c NcUg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10-v6si1911822pgp.496.2018.05.01.02.19.14; Tue, 01 May 2018 02:19:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755352AbeEAJRJ (ORCPT + 99 others); Tue, 1 May 2018 05:17:09 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:44078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753878AbeEAJLX (ORCPT ); Tue, 1 May 2018 05:11:23 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7AA531682; Tue, 1 May 2018 02:11:23 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.206.73]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 46FA93F487; Tue, 1 May 2018 02:11:21 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, mike.leach@linaro.org, robert.walker@arm.com, mark.rutland@arm.com, will.deacon@arm.com, robin.murphy@arm.com, sudeep.holla@arm.com, frowand.list@gmail.com, robh@kernel.org, john.horley@arm.com, Suzuki K Poulose Subject: [PATCH v2 06/27] coresight: tmc etr: Disallow perf mode temporarily Date: Tue, 1 May 2018 10:10:36 +0100 Message-Id: <1525165857-11096-7-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525165857-11096-1-git-send-email-suzuki.poulose@arm.com> References: <1525165857-11096-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't support ETR in perf mode yet. Temporarily fail the operation until we add proper support. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-tmc-etr.c | 28 ++----------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 9b0c620..bff46f2 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -218,32 +218,8 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev) static int tmc_enable_etr_sink_perf(struct coresight_device *csdev) { - int ret = 0; - unsigned long flags; - struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); - - spin_lock_irqsave(&drvdata->spinlock, flags); - if (drvdata->reading) { - ret = -EINVAL; - goto out; - } - - /* - * In Perf mode there can be only one writer per sink. There - * is also no need to continue if the ETR is already operated - * from sysFS. - */ - if (drvdata->mode != CS_MODE_DISABLED) { - ret = -EINVAL; - goto out; - } - - drvdata->mode = CS_MODE_PERF; - tmc_etr_enable_hw(drvdata); -out: - spin_unlock_irqrestore(&drvdata->spinlock, flags); - - return ret; + /* We don't support perf mode yet ! */ + return -EINVAL; } static int tmc_enable_etr_sink(struct coresight_device *csdev, u32 mode) -- 2.7.4