Received: by 10.192.165.148 with SMTP id m20csp4579624imm; Tue, 8 May 2018 10:37:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrLGcfYQEg68QLH7C0kUe7scyzNIQJy8rEG8vHTNjrcig8yVjsplcalutnXwvK/WZLFj7S4 X-Received: by 2002:a63:66c2:: with SMTP id a185-v6mr23001142pgc.347.1525801079195; Tue, 08 May 2018 10:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525801079; cv=none; d=google.com; s=arc-20160816; b=izyIUA3QvTx6ELhoMhlPBI9jBFT8ZXMwYef8NvqNsR+o2e++U/c7NbcH/BeersXKSt 69zI7TD6Dr2KYKEv1zrcmBuJXhSXPiF9GsMJznWmTDvu6cGjUmDV7B2Lv3K4dEu0LKYc zUZnzGaTuauVbD6V7ZOi/OsMElZAuU8k2qBQIPaSvFV7dpCz0nd7KXgUu62e6zCGy6kZ HLpuC28X3FatlwH9fPj3lggMMMjoO6ZOUv1GjGQ5N+8/iY0zUVgh66O5M4KPHRIjviHH 4DI9JL5sdtplE8B7iF0UwxNpv99Naff/0PrZ/HbiUSQFklCaUOigDnLcz2cS3mD0JpR+ MEyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=vniWIHA8PHdMdKP074U6OzLjLRmnz84eB/JG/loTMiI=; b=WEWQg23/USu74KTWiopy5rgBPkYYPDbYE4nu87hBRW3selOUo1zQ2wQBbw0iwWVfgH z95VrgHUrJGcYJL6UFm6NzjsKyXxQowNjOuy2TjVUolAYkMA7azQmQdLjWiwpjKHrstI rUVbmy0QfYG3PKhentLzRzdLfNFyFag2KfgNdUdZNMjcj3rQwXgZ4TtXY4nw5tBBwahg pSQ1eazQWhgUUUP95yKm3Iu0lG4+lJLOm1hAJ/f+rgAZnqV5BkF5yoYo3Xcbl2Z27ZrG j4Mo1LfppPfxqnxbmMGfbueBbFvZWs5f7lkK3VfzvYPfswx9SDxp+jdKFGq9QXkDD9yk VZmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dSKoo7iD; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2-v6si19533258pgq.221.2018.05.08.10.37.44; Tue, 08 May 2018 10:37:59 -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=@kernel.org header.s=default header.b=dSKoo7iD; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755544AbeEHRfB (ORCPT + 99 others); Tue, 8 May 2018 13:35:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:58814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754460AbeEHRfA (ORCPT ); Tue, 8 May 2018 13:35:00 -0400 Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com [209.85.220.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6C29521838; Tue, 8 May 2018 17:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525800899; bh=wSoQoGxryFMGDn1qPTeR5qYfur+s+G04al9cjCJvXRI=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=dSKoo7iD8ehWUlY0jZ3X+q+tBWu5p+82jQmBAzZVMA9dtuqdT2SHK5CrBHO+ENLgr eGkJwF0MbryH/pW4nesVwyC+tW/xLkT1YHfOqHXbPnJFrNd7/RB/z6Kk09Z8TRzZaq Cm0b7BEunMlVUdsAVdAcdGnYecoAFhxx6O5oGCH0= Received: by mail-qk0-f175.google.com with SMTP id c64so471987qkf.12; Tue, 08 May 2018 10:34:59 -0700 (PDT) X-Gm-Message-State: ALQs6tBIyKSDL03zncWkTq8zraq6sE0fzAqd6fgCxVcM7aHcuO35LsfY J4c0tk+1Kf+F5FGbx6Op+99lId8f5fKngzIhAg== X-Received: by 10.55.64.80 with SMTP id n77mr28258757qka.213.1525800898572; Tue, 08 May 2018 10:34:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.155.2 with HTTP; Tue, 8 May 2018 10:34:37 -0700 (PDT) In-Reply-To: <514f69b1-2219-aa83-dfe8-09c26ed4f5b1@arm.com> References: <1525165857-11096-1-git-send-email-suzuki.poulose@arm.com> <1525165857-11096-11-git-send-email-suzuki.poulose@arm.com> <20180501131300.GA31425@rob-hp-laptop> <514f69b1-2219-aa83-dfe8-09c26ed4f5b1@arm.com> From: Rob Herring Date: Tue, 8 May 2018 12:34:37 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 10/27] dts: bindings: Restrict coresight tmc-etr scatter-gather mode To: Suzuki K Poulose Cc: Mathieu Poirier , linux-arm-kernel , "linux-kernel@vger.kernel.org" , Mike Leach , Robert Walker , Mark Rutland , Will Deacon , Robin Murphy , Sudeep Holla , Frank Rowand , John Horley , Mathieu Poirier , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 8, 2018 at 10:48 AM, Suzuki K Poulose wrote: > On 04/05/18 23:56, Rob Herring wrote: >> >> On Thu, May 3, 2018 at 3:32 PM, Mathieu Poirier >> wrote: >>> >>> On 1 May 2018 at 07:13, Rob Herring wrote: >>>> >>>> On Tue, May 01, 2018 at 10:10:40AM +0100, Suzuki K Poulose wrote: >>>>> >>>>> We are about to add the support for ETR builtin scatter-gather mode >>>>> for dealing with large amount of trace buffers. However, on some of >>>>> the platforms, using the ETR SG mode can lock up the system due to >>>>> the way the ETR is connected to the memory subsystem. >>>>> >>>>> In SG mode, the ETR performs READ from the scatter-gather table to >>>>> fetch the next page and regular WRITE of trace data. If the READ >>>>> operation doesn't complete(due to the memory subsystem issues, >>>>> which we have seen on a couple of platforms) the trace WRITE >>>>> cannot proceed leading to issues. So, we by default do not >>>>> use the SG mode, unless it is known to be safe on the platform. >>>>> We define a DT property for the TMC node to specify whether we >>>>> have a proper SG mode. > > > >>>>> --- >>>>> Documentation/devicetree/bindings/arm/coresight.txt | 3 +++ >>>>> drivers/hwtracing/coresight/coresight-tmc.c | 8 +++++++- >>>>> 2 files changed, 10 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/arm/coresight.txt >>>>> b/Documentation/devicetree/bindings/arm/coresight.txt >>>>> index cdd84d0..7c0c8f0 100644 >>>>> --- a/Documentation/devicetree/bindings/arm/coresight.txt >>>>> +++ b/Documentation/devicetree/bindings/arm/coresight.txt >>>>> @@ -88,6 +88,9 @@ its hardware characteristcs. >>>>> * arm,buffer-size: size of contiguous buffer space for TMC ETR >>>>> (embedded trace router) >>>>> >>>>> + * scatter-gather: boolean. Indicates that the TMC-ETR can safely >>>>> + use the SG mode on this system. >>>>> + >>>> >>>> >>>> Needs a vendor prefix. >>>> >>> >>> Thinking further on this, do we need to make it device specific as >>> well - something like "arm,etr-scatter-gather"? That way we don't >>> have to redefine "scatter-gather" for other ARM devices if they happen >>> to need the same property but for different reasons. >> >> >> No. If we had a bunch of cases, then we'd probably want to have just >> 'scatter-gather'. > > > Does it mean "arm,scatter-gather" ? Yes. Use that. > If we ever wanted to add the device > specific information, I would prefer to go with "arm,tmc-scatter-gather" > and not "etr-scatter-gather". They both could mean different things. > >> >> BTW, if SG had already been supported, then I'd say this is a quirk >> and we should invert this property. Otherwise, you'd be disabling once >> enabled SG and require working platforms to update their dtb. Of >> course, I shouldn't really let the state of an OS driver influence the >> DT binding. >> > > The SG support is added with this series. So, the OS has never made use > of the feature. Linux never did, but other OSs use DT, hence why I said "an OS driver", not "the OS driver". But in reality, I'd guess only Linux has Coresight support at all. Rob