Received: by 10.192.165.148 with SMTP id m20csp3624322imm; Mon, 7 May 2018 15:56:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqMyhzS4SS/iNYMsTYuxoArsVd1ImOGRtEjnwxOEI0m/c8fNPCmjjKEhvOXqEJRJmUMYJUb X-Received: by 2002:a17:902:8b89:: with SMTP id ay9-v6mr39310932plb.100.1525733787953; Mon, 07 May 2018 15:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525733787; cv=none; d=google.com; s=arc-20160816; b=W748SZameITBytG3CX8Pc91ovFLiecNz4jg7tyvfi2S9ztNhejeV0OkcOKEtjmPWmP VTSmXTxx+ZmRElTVHktFQFutVkWhkA+4R5XfMcPOnJqLCAGqA4D9mExv+Bok0Y4qp5oN iJnOqEeHU6iJmf+Ld6L3KyFpYYnIgy0C+11gMmt20POXNmd8pjrRIChMFXyPUQM3jRMr Aw0Lh8jF6SjW1JRRWRNvHfhR7tkCF+2+uJXFfszXvKpypcISccK9t8sgjWAqxNWXWIms 90kSWMB8mYbTYN0uii0SD+hPaaq5HN5zPJXyLw/ItDdB5VHUYuVUZXSOJhi5IHiGgz2i JqXA== 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:dkim-signature:arc-authentication-results; bh=CyAY5wYh7ZwFoxz38FJdxR3itL4GErKeE51U4iebwi8=; b=E2eUb9P+CLE/b8NUe1Eslzgi9hw3UXVF5ZJJwWuVcrEXezeVHl8KYGqV96gpiiWqPj EZCRyxx4UQEbdUCjQ6dKnYA/ip2+ezEQqYwMLEaUy/XYb3OcsZ0vcAKt3ORlFjvF6mPi GG7FjVugNRXNpDniXHLsSqsWa2dc2QdD+s/yBzeZl5RaKP74a9Gs+sJ3zBiZCbeCQJOh mmhSTeKWgVGJyDacO42Y+OMixhSvx2BEmrQ+2MNtoHBXvF0gXMstnYY8bFdWC0rexF4X zRYem+eYwRVhyPYCun67R5y2EpcaGsl/BS2ozty6bR0S8l/AmdjHr8WE9bJG4ejBgHbO fQUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GrMNC9/A; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14-v6si18007665pgv.648.2018.05.07.15.56.11; Mon, 07 May 2018 15:56:27 -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; dkim=pass header.i=@linaro.org header.s=google header.b=GrMNC9/A; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752841AbeEGWyr (ORCPT + 99 others); Mon, 7 May 2018 18:54:47 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:40827 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbeEGWyq (ORCPT ); Mon, 7 May 2018 18:54:46 -0400 Received: by mail-pl0-f66.google.com with SMTP id t22-v6so1002906plo.7 for ; Mon, 07 May 2018 15:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CyAY5wYh7ZwFoxz38FJdxR3itL4GErKeE51U4iebwi8=; b=GrMNC9/Aj2J9yTXjQC5h1iV1CKIJxsYwj/4H+z4/xZlbBXOhbalAN8D/62nzMKGe99 FtN0I2iPQ41x2VoNX9zXCu6S6jmPiNEZ6K1jZ9qzmV7MNXCE9MjO5AFuzUtWR9uHcuUc jgHnq7oKi72dxu5Yfc1AQQ+Cg6xFKpc2agAeE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CyAY5wYh7ZwFoxz38FJdxR3itL4GErKeE51U4iebwi8=; b=udYMZRQALAQlXvQneVI2LRFmaUBTgETIASLR6/pn2D5xfPlEcFVrEor2VmFE+Ec917 QRDUjGKLpENdo/npZRXT3pxqVkJSCUTPsbcfPI6v06h4MjWMjKKrptTH+I8A8v0xJLdQ 5CGjUzTnzGLw+jAwGVtYIfsjsSvFle33ngCre9MdrfP3G9Y9ehh9Z63XGmobC/ivWKlt GWQVBwiCEbxpI1AajVYcj/7RK/5XaxoUHa+ymnkuzhUBHUG6NXSCFE+BWL73kUCS8hCa Apm8+aEkO74CeUH13o9PCOpHX+ThZLdXWOwF61rdfUINPBCXtykhFXyO6mYfX1tmxLFS EdSQ== X-Gm-Message-State: ALQs6tCVdAcgXOht8aNPjWar8YPsHO2efbaBgDFu4In53wK8lUgSsT2p ZlKCVyJr4bJipEXWXvIRMDJYlw== X-Received: by 2002:a17:902:24e:: with SMTP id 72-v6mr38258654plc.87.1525733685819; Mon, 07 May 2018 15:54:45 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id y2-v6sm33525493pgp.92.2018.05.07.15.54.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 15:54:44 -0700 (PDT) Date: Mon, 7 May 2018 16:54:42 -0600 From: Mathieu Poirier To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 Subject: Re: [PATCH v2 24/27] coresight: tmc-etr: Relax collection of trace from sysfs mode Message-ID: <20180507225442.GC22194@xps15> References: <1525165857-11096-1-git-send-email-suzuki.poulose@arm.com> <1525165857-11096-25-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1525165857-11096-25-git-send-email-suzuki.poulose@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 01, 2018 at 10:10:54AM +0100, Suzuki K Poulose wrote: > Since the ETR now uses mode specific buffers, we can reliably > provide the trace data captured in sysfs mode, even when the ETR > is operating in PERF mode. > > Cc: Mathieu Poirier > Signed-off-by: Suzuki K Poulose > --- > drivers/hwtracing/coresight/coresight-tmc-etr.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c > index a35a12f..7551272 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c > @@ -1439,19 +1439,17 @@ int tmc_read_prepare_etr(struct tmc_drvdata *drvdata) > goto out; > } > > - /* Don't interfere if operated from Perf */ > - if (drvdata->mode == CS_MODE_PERF) { > - ret = -EINVAL; > - goto out; > - } > - > - /* If sysfs_buf is NULL the trace data has been read already */ > + /* > + * We can safely allow reads even if the ETR is operating in PERF mode, > + * since the sysfs session is captured in mode specific data. > + * If drvdata::sysfs_data is NULL the trace data has been read already. > + */ > if (!drvdata->sysfs_buf) { > ret = -EINVAL; > goto out; > } > > - /* Disable the TMC if we are trying to read from a running session */ > + /* Disable the TMC if we are trying to read from a running session. */ Move that to the previous patch. > if (drvdata->mode == CS_MODE_SYSFS) > tmc_etr_disable_hw(drvdata); > > -- > 2.7.4 >