Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp297564rdb; Fri, 6 Oct 2023 04:03:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6biAqEvxtaNQF8f2qX3tHhsuQ/d7gDVgbsXVFSxFmUE9Kyhh02Kz3uAfT/1GTeCBg6DCp X-Received: by 2002:a05:6a20:6a1a:b0:154:fb34:5f09 with SMTP id p26-20020a056a206a1a00b00154fb345f09mr9080159pzk.15.1696590229927; Fri, 06 Oct 2023 04:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696590229; cv=none; d=google.com; s=arc-20160816; b=xk9/zoo9xbOHiqk8drKWC4NCXQb7LfgeRNkqoJePT9lh2NjrS05mPmxEN2s/mUqmi+ dDPDXVtartFr9PCn0fGOZ1P1vR0BEyR6EVev7sPAhfXirkv7sIlSGwZNsWEKaO82F/zs +5zfj85VSR3CJ410JmFHGy+1yURzGZBLHeqKM+8zI6bX3xG/Rh1VwAGmwmfryX4nuslI Yj+JokuTNsypncev2CtPUanyYGSKn7WACXcMKtPWL+jrNrqPgqOJaldrTHkc3jsAsp82 v3zvo9pyqiSh4wVzJdqmpIpGtOp5uchrPO82Zc5Ng+WJKv6Fc5FqJZUpd0oyZgRp1tli b/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zxFEgt05/Om310YXHqztn12qfKEglhAS71n4alSmu1w=; fh=brrYMI/mRtnZ7ZH3kC0ArLEkq3WxrrB5xsif0CMJJZY=; b=lIg9vtBLdju9bcpvC6irSvd9F5wWRAv/QKXFfsRamFhnIstwaV/wsnq9nYa3+m6uER HxLp0LH4C2pR8LmuseVaFU4LbLlHFX92cwdm78urKpfWdR7+m1R4vUoqQK7egUL9i0gT HIaOyuK1nRoaBWi5m/NjWvWZRiX03KS3yiclxkdea8IR2EuHv2BdMChUn6M31ly7yEWW MMDcJuIg7q50HTeGGc6P8psGgIG+oyZM1NDzwkpnAuqf8kBsYvSthVG5txm4Cpj8Ji/b 3536ujA4iDf4DXg9k0E6IZkEzTbzQi8J7ZVuGb9It9PQhpZoHJ4swQRnIw3QnlNSSPR4 MB1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e3yUzQd8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b16-20020a056a000cd000b0068e45c6ca3fsi1270376pfv.93.2023.10.06.04.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 04:03:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e3yUzQd8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id F17E683D8D5D; Fri, 6 Oct 2023 04:03:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbjJFLDd (ORCPT + 99 others); Fri, 6 Oct 2023 07:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231882AbjJFLDb (ORCPT ); Fri, 6 Oct 2023 07:03:31 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F95FDB for ; Fri, 6 Oct 2023 04:03:29 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-564b6276941so1424943a12.3 for ; Fri, 06 Oct 2023 04:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696590209; x=1697195009; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zxFEgt05/Om310YXHqztn12qfKEglhAS71n4alSmu1w=; b=e3yUzQd8CmCbQ6hVTGYl4tVVxHeaJ56vwmjPNSrfz0ZxwgR7/DmL8g5lD3NedI1n7C Va3Nu0iNwHN9UEmIikDyvuaAnh93aYttSGzY00gxtNCOGNRdaLW18pIHAG1Irk+zRa/g EjCImSUFFq7BgSizT8B0hL2tP7Li2r8uHu16iD1bBMLy280sy1QvE4arWyll6pk83X3i OLa8rEzwJ0VrNv3GiUZgJSmRy2vY064xZtSFk/Vot0bfY7WR9SDNvE0P3o8biFnG62vy GxnlALWDMk1tEha2x8nueu+5vzWiCmoJrW9XKJHJw0tdcSAHOc8axaOOcwNlWqw7M7r0 QqTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696590209; x=1697195009; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zxFEgt05/Om310YXHqztn12qfKEglhAS71n4alSmu1w=; b=eXjBWJUdb4sks9z4yXhM80IpAs8qgDcLA6VxMNRARFe2e8A3LE6/gkkhvpfRn17eqP osBdiY5yFgFoOG3joleYcI7g5mXwyKhkblD0tMH2nuDJSvLRmKNCbC6eLhHoZG5Sbvzm 9Hg/+s3wmGRskEehbY5Iru1WM56y1HiWIo+TMI9bhz1XtsT6ahe/hb0eCqjR/g2OpAl5 qrJSsMR7BEwiaTkfI24faY6fMBBYIRVb6Km8Zo2aC34TlCbVYPUKpxka7nPQCEhWv4lI XihGnfSzecHg8uHuscteXVREqcWFtim5za9L+ZRUMqIBqLWq/kzw0EQPwoYBZn+Roq8d Bu9w== X-Gm-Message-State: AOJu0Yy5Yt5+7Ut4PvDryuiVxUg938wnt6JuwlIKV1lKrpUhbN4I6ncN bhi5/t4Kt4TxSbnXmKLiBtliPTxP+wvb1IJDvkbFSw== X-Received: by 2002:a17:90a:9513:b0:269:46d7:f1db with SMTP id t19-20020a17090a951300b0026946d7f1dbmr8304821pjo.32.1696590208682; Fri, 06 Oct 2023 04:03:28 -0700 (PDT) MIME-Version: 1.0 References: <20230929133754.857678-1-lcherian@marvell.com> <20230929133754.857678-2-lcherian@marvell.com> In-Reply-To: <20230929133754.857678-2-lcherian@marvell.com> From: Mike Leach Date: Fri, 6 Oct 2023 12:03:17 +0100 Message-ID: Subject: Re: [PATCH 1/7] dt-bindings: arm: coresight-tmc: Add "memory-region" property To: Linu Cherian Cc: suzuki.poulose@arm.com, james.clark@arm.com, leo.yan@linaro.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, sgoutham@marvell.com, gcherian@marvell.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 04:03:45 -0700 (PDT) X-Spam-Level: ** Hi Linu On Fri, 29 Sept 2023 at 14:38, Linu Cherian wrote: > > memory-region 0: Reserved trace buffer memory > > TMC ETR: When available, use this reserved memory region for > trace data capture. Same region is used for trace data > retention after a panic or watchdog reset. > > TMC ETF: When available, use this reserved memory region for > trace data retention synced from internal SRAM after a panic or > watchdog reset. > > memory-region 1: Reserved meta data memory > > TMC ETR, ETF: When available, use this memory for register > snapshot retention synced from hardware registers after a panic > or watchdog reset. > > Signed-off-by: Linu Cherian > --- > .../bindings/arm/arm,coresight-tmc.yaml | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml > index cb8dceaca70e..45ca4d02d73e 100644 > --- a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml > +++ b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml > @@ -101,6 +101,22 @@ properties: > and ETF configurations. > $ref: /schemas/graph.yaml#/properties/port > > + memory-region: > + items: > + - description: Reserved trace buffer memory for ETR and ETF sinks. > + For ETR, this reserved memory region is used for trace data capture. > + Same region is used for trace data retention as well after a panic > + or watchdog reset. > + For ETF, this reserved memory region is used for retention of trace > + data synced from internal SRAM after a panic or watchdog reset. > + Is there a valid use case for ETR where we use these areas when there is not a panic/reset situation? Either way - the description should perhaps mention that these areas are only used if specifically selected by the driver - the default memory usage models for ETR / perf are otherwise unaltered. > + - description: Reserved meta data memory. Used for ETR and ETF sinks. > + > + memory-region-names: > + items: > + - const: trace-mem > + - const: metadata-mem > + Is there a constraint required here? If we are using the memory area for trace in a panic situation, then we must have the meta data memory area defined? Perhaps a set of names such as "etr-trace-mem", "panic-trace-mem" , "panic-metadata-mem", were the first is for general ETR trace in non-panic situation and then constrain the "panic-" areas to appear together. The "etr-trace-mem", "panic-trace-mem" could easily point to the same area. > required: > - compatible > - reg > @@ -115,6 +131,9 @@ examples: > etr@20070000 { > compatible = "arm,coresight-tmc", "arm,primecell"; > reg = <0x20070000 0x1000>; > + memory-region = <&etr_trace_mem_reserved>, > + <&etr_mdata_mem_reserved>; > + memory-region-names = "trace-mem", "metadata-mem"; > > clocks = <&oscclk6a>; > clock-names = "apb_pclk"; > -- > 2.34.1 > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK