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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FF34C77B7A for ; Wed, 7 Jun 2023 09:06:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235218AbjFGJGB (ORCPT ); Wed, 7 Jun 2023 05:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238467AbjFGJFf (ORCPT ); Wed, 7 Jun 2023 05:05:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94FE82137; Wed, 7 Jun 2023 02:04:43 -0700 (PDT) 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 28CFEAB6; Wed, 7 Jun 2023 02:05:28 -0700 (PDT) Received: from [10.57.25.235] (unknown [10.57.25.235]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2612D3F587; Wed, 7 Jun 2023 02:04:40 -0700 (PDT) Message-ID: <95530dcc-aad3-cf4d-f5cc-9ba504ac7abf@arm.com> Date: Wed, 7 Jun 2023 10:04:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: [PATCH V5 5/6] coresight: platform: acpi: Ignore the absence of graph To: Mike Leach , Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, scclevenger@os.amperecomputing.com, Ganapatrao Kulkarni , Rob Herring , Frank Rowand , Russell King , Greg Kroah-Hartman , "Rafael J. Wysocki" , Len Brown , Sudeep Holla , Lorenzo Pieralisi , Mathieu Poirier , Leo Yan , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230529062511.52016-1-anshuman.khandual@arm.com> <20230529062511.52016-6-anshuman.khandual@arm.com> From: Suzuki K Poulose In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 07/06/2023 09:58, Mike Leach wrote: > HI Ansuman, > > On Mon, 29 May 2023 at 07:26, Anshuman Khandual > wrote: >> >> From: Suzuki K Poulose >> >> Some components may not have graph connections for describing >> the trace path. e.g., ETE, where it could directly use the per >> CPU TRBE. Ignore the absence of graph connections >> >> Signed-off-by: Suzuki K Poulose >> Signed-off-by: Anshuman Khandual >> --- >> drivers/hwtracing/coresight/coresight-platform.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c >> index 475899714104..c4b4fbde8550 100644 >> --- a/drivers/hwtracing/coresight/coresight-platform.c >> +++ b/drivers/hwtracing/coresight/coresight-platform.c >> @@ -692,8 +692,12 @@ static int acpi_coresight_parse_graph(struct acpi_device *adev, >> >> pdata->nr_inport = pdata->nr_outport = 0; >> graph = acpi_get_coresight_graph(adev); >> + /* >> + * There are no graph connections, which is fine for some components. >> + * e.g., ETE >> + */ >> if (!graph) >> - return -ENOENT; >> + return 0; >> > > Should we not determine if it is valid for a particular component not > to have a graph connection? > Prior to this patch an incorrectly configured ETMv4 - which must have > a graph would return an error, after this it will fail silently I think it doesn't call for a failure. The ETM could still be probed but is not usable. We provide enough information via the sysfs, i.e., connection links, which should be sufficient for the user to detect this case. Also, this change is inline with what we do for ETMv4 with DT. Suzuki