From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA104CD1292 for ; Thu, 4 Apr 2024 10:54:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gLjXfWgtomuQfAg68bkDAVIgUJ/x05nZg0Sy9IGjIy0=; b=lEzou6bFJgErqW 5zddaUj8ponu06flxWJnETbShKTmRBLMbE0vrNjrVu5KsGDn0CyMomr4gCewqOsGOVp957CUkkNNM Fi3fHsFehGicM2IQ/+zoEgHMkjNsCLzPpFVSWaFeonK9M1kEyiHcMw+0GMtFBWL708FVHWJkBefuP 5kECddCvIn4fWP5PBcSCV4NhKy4dGCjjFw+ojiTGWOl/leBALEmoreZS+7mg1Jj1VIBT3p+cpeI6h CypyV1GW4cpwbqCwuNIi4k45IkJ7imdRnDMkb1CVFSOTeMRgRHHrnULhSQLotpOpdNFFwyVl4/T7i Ymay2jtT1joH6LWlo63g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsKjC-00000002G3U-0vqC; Thu, 04 Apr 2024 10:53:54 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsKj5-00000002Fxm-3W4n for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2024 10:53:51 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 03C81FEC; Thu, 4 Apr 2024 03:54:13 -0700 (PDT) Received: from [192.168.1.100] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 348813F7B4; Thu, 4 Apr 2024 03:53:41 -0700 (PDT) Message-ID: Date: Thu, 4 Apr 2024 11:53:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] coresight: tmc: Enable SG capability on ACPI based SoC-400 TMC ETR devices To: Anshuman Khandual , linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: sudeep.holla@arm.com, Mike Leach , Alexander Shishkin , coresight@lists.linaro.org, linux-kernel@vger.kernel.org References: <20240404072934.940760-1-anshuman.khandual@arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20240404072934.940760-1-anshuman.khandual@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_035348_232836_8E351D68 X-CRM114-Status: GOOD ( 21.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 04/04/2024 08:29, Anshuman Khandual wrote: > This detects and enables the scatter gather capability (SG) on ACPI based > Soc-400 TMC ETR devices via a new property called 'arm-armhc97c-sg-enable'. > The updated ACPI spec can be found below, which contains this new property. > > https://developer.arm.com/documentation/den0067/latest/ > > This preserves current handling for the property 'arm,scatter-gather' both > on ACPI and DT based platforms i.e the presence of the property is checked > instead of the value. > > Cc: Suzuki K Poulose > Cc: Mike Leach > Cc: James Clark > Cc: Alexander Shishkin > Cc: coresight@lists.linaro.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > --- > .../hwtracing/coresight/coresight-tmc-core.c | 28 ++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c > index 72005b0c633e..2b277499b59a 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-core.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c > @@ -4,6 +4,7 @@ > * Description: CoreSight Trace Memory Controller driver > */ > > +#include > #include > #include > #include > @@ -360,7 +361,32 @@ static const struct attribute_group *coresight_etr_groups[] = { > > static inline bool tmc_etr_can_use_sg(struct device *dev) > { > - return fwnode_property_present(dev->fwnode, "arm,scatter-gather"); > + int ret; > + u8 val_u8; > + > + /* > + * Presence of the property 'arm,scatter-gather' is checked > + * on the platform for the feature support, rather than its > + * value. > + */ > + if (is_of_node(dev->fwnode)) { > + return fwnode_property_present(dev->fwnode, "arm,scatter-gather"); > + } else if (is_acpi_device_node(dev->fwnode)) { > + /* > + * TMC_DEVID_NOSCAT test in tmc_etr_setup_caps(), has already ensured > + * this property is only checked for Coresight SoC 400 TMC configured > + * as ETR. > + */ > + ret = fwnode_property_read_u8(dev->fwnode, "arm-armhc97c-sg-enable", &val_u8); > + if (!ret) > + return !!val_u8; > + > + if (fwnode_property_present(dev->fwnode, "arm,scatter-gather")) { > + pr_warn_once("Deprecated ACPI property - arm,scatter-gather\n"); > + return true; > + } > + } > + return false; > } > > static inline bool tmc_etr_has_non_secure_access(struct tmc_drvdata *drvdata) Reviewed-by: James Clark _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel