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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE31FC433E0 for ; Tue, 2 Feb 2021 11:11:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9177664E31 for ; Tue, 2 Feb 2021 11:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230063AbhBBLL0 (ORCPT ); Tue, 2 Feb 2021 06:11:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbhBBLKx (ORCPT ); Tue, 2 Feb 2021 06:10:53 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0894AC06174A for ; Tue, 2 Feb 2021 03:10:13 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 190so2033085wmz.0 for ; Tue, 02 Feb 2021 03:10:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ovhx5C9K0mtaqY6XtiS1biDzAm8u7MdzCszIDE33A1k=; b=BrCtIu1R36f/I7pRSjgLygk181SAV9U7Yxrap3fUhshC7UlJ1zyjoFRLngg6VVnBO1 6xwVVpSBlzFRbAshELn3LdihVafMR88ZBQdD1Lmy+/wF6QnWFCvWeMZLGGfWbLykeD+O RB75SGuCpXHeknNGBmpJNtRxlefkGz7rqmKZqAzRgjxG3TmvTV/OHb65s4K5sH+9z+ap VFXFa90fzPr+aLdJmf+qjQ9LGr+aIbyRV5FkoPuo+LXlvqfaZMfs0xwHkvrCMd4GdnnN ULwzsKGwJO+SEuDI0CJB5gnr4SVv6ibZb8/Oa5Mn9ac2pnS2hlGSzgBVD6tSFvf69x4C uZzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ovhx5C9K0mtaqY6XtiS1biDzAm8u7MdzCszIDE33A1k=; b=bEI5WpPbu0MVDZUoZ96LtVET4VPgL5sFPlBYIJQK9Qykquk2Ul2xFpqMSplDcNUR0C kRPIathEQ9Zy9wySO+uRi5g7NcKc72zL6jgpusolbtBv1e2+Go6Pz7ipQticEHJ9FfHM fv8iaSHp6rgvxtCTfzRbtjoX7YnoHNIQNp5G9tYgBP1IHAtZA0GwHPxZkzUV2tOyMJka eYVilXOZb+2/rxHFWAM9vcD38Doo1DivjbLdQywp26dR8djDHe3XrRkqXPtiFu0isyyb fvLSbPwIbVsdub5NbktmbpRDAvIIVtFlDcb8cCUiiNT7gXmRCYSlxeDIoC+ZEJl3DYZj R7ng== X-Gm-Message-State: AOAM531ZSXdwkH2AvwR2Div4r5SLouspOfcaVjiOqsK2Qn6bF0Odlgqu KS0iJmtKOeBmjFabKXr5Owm8YcWvtO7VfNL3IYAH6cn1Ck8= X-Google-Smtp-Source: ABdhPJxtISbwoAPA4/f8pKMubkFEjP8BsCANvKL+r86oM6j9mMbRYcbRvXOveb7hiF8ngnC7pIRMBDr8ofGjDdQzwLw= X-Received: by 2002:a05:600c:28b:: with SMTP id 11mr3101421wmk.98.1612264211771; Tue, 02 Feb 2021 03:10:11 -0800 (PST) MIME-Version: 1.0 References: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> <1611737738-1493-3-git-send-email-anshuman.khandual@arm.com> In-Reply-To: <1611737738-1493-3-git-send-email-anshuman.khandual@arm.com> From: Mike Leach Date: Tue, 2 Feb 2021 11:10:01 +0000 Message-ID: Subject: Re: [PATCH V3 02/14] coresight: Do not scan for graph if none is present To: Anshuman Khandual Cc: linux-arm-kernel , Coresight ML , Mathieu Poirier , "Suzuki K. Poulose" , Linu Cherian , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ansuman, On Wed, 27 Jan 2021 at 08:55, Anshuman Khandual wrote: > > From: Suzuki K Poulose > > If a graph node is not found for a given node, of_get_next_endpoint() > will emit the following error message : > > OF: graph: no port node found in / > > If the given component doesn't have any explicit connections (e.g, > ETE) we could simply ignore the graph parsing. > > Cc: Mathieu Poirier > Cc: Mike Leach > Signed-off-by: Suzuki K Poulose > Signed-off-by: Anshuman Khandual > --- > drivers/hwtracing/coresight/coresight-platform.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c > index 3629b78..c594f45 100644 > --- a/drivers/hwtracing/coresight/coresight-platform.c > +++ b/drivers/hwtracing/coresight/coresight-platform.c > @@ -90,6 +90,12 @@ static void of_coresight_get_ports_legacy(const struct device_node *node, > struct of_endpoint endpoint; > int in = 0, out = 0; > > + /* > + * Avoid warnings in of_graph_get_next_endpoint() > + * if the device doesn't have any graph connections > + */ > + if (!of_graph_is_present(node)) > + return; The problem here is that you are masking genuine errors. The solution is to either call this only if the device type is one that ports are not required - i.e. ETE, or upgrade the .dts bindings for the rest of the ETM devices to yaml so that the ports requirement is checked and validated there. Regards Mike > do { > ep = of_graph_get_next_endpoint(node, ep); > if (!ep) > -- > 2.7.4 > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK 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 X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A25A3C433E0 for ; Tue, 2 Feb 2021 11:11:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C2E164E06 for ; Tue, 2 Feb 2021 11:11:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C2E164E06 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=k6KpSBScm1NyJEinmLIqJBa+mylGxhhmZi+fgqVdF5M=; b=pxwxbSf7WWPu6jyfKdTb4x+NI z8HN5S5qoDDElceS34C5wlh8+z6hiGJELpQnr2Wvu8tUICIw9zNmkW6CiPQi6q5yS7vUwLL0I4lBS 1EjKOdf3+AE+9OMbfg0vZECvJ003iFfcQudYCA82AgTRTRHn39kaQHoozqGxa7jR7NIhhW6EvRMDJ Kppc8RjxT6cpB23LH967sYVeKs6K+Unw1WUADWzLYp6JaXJIwXGgDnOdwMrf+RR22Q2wuPr3PtTVp nO7QQsVXE6dWFuU6HDtGaEumVM/xxuNq3COSXmCPEbH9VZBbCSriAk2sv4NnvX/Jg3XQNfMo2H2yw 5CdDQRsNg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6tZa-00031j-6q; Tue, 02 Feb 2021 11:10:18 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6tZW-00030i-Sa for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 11:10:16 +0000 Received: by mail-wm1-x332.google.com with SMTP id l12so949642wmq.2 for ; Tue, 02 Feb 2021 03:10:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ovhx5C9K0mtaqY6XtiS1biDzAm8u7MdzCszIDE33A1k=; b=BrCtIu1R36f/I7pRSjgLygk181SAV9U7Yxrap3fUhshC7UlJ1zyjoFRLngg6VVnBO1 6xwVVpSBlzFRbAshELn3LdihVafMR88ZBQdD1Lmy+/wF6QnWFCvWeMZLGGfWbLykeD+O RB75SGuCpXHeknNGBmpJNtRxlefkGz7rqmKZqAzRgjxG3TmvTV/OHb65s4K5sH+9z+ap VFXFa90fzPr+aLdJmf+qjQ9LGr+aIbyRV5FkoPuo+LXlvqfaZMfs0xwHkvrCMd4GdnnN ULwzsKGwJO+SEuDI0CJB5gnr4SVv6ibZb8/Oa5Mn9ac2pnS2hlGSzgBVD6tSFvf69x4C uZzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ovhx5C9K0mtaqY6XtiS1biDzAm8u7MdzCszIDE33A1k=; b=RLU3JYGJXuXM1AMDbHB1Wn5xjwtXkqUuN1JrpFv41e3Q43eM1trxqqsS2H6+64Kkgo r7thgSF7SrMnbch1PoFIggu4nkP/4Oc+hkHTcy/OEZKNXHFF6ohjlZfbg+DzqnNHIEAe 4NSAY0diB8r2HzoqUPY8+9MiNSHi1SIJKBzeaaO318BtDvtgZtilBQm7nXd1h1fKokZq p//EIopxury+twkv7S4ecIgKo04M8DS+3+iLIbefDh/PiI1dH7lj6wvkU/m0k+36NVXP cI14iRoxYDNYKOxPHXe8mnH+3bY5+R7zAJPFHyk/oJ3QQwroHZSP2kzttogsqkMgI1RP bGkw== X-Gm-Message-State: AOAM533UtI8mN1qy8/LWKqhV93FOL68euI/qyXKkSlQUOFnOz0V91yZb 0XWyDSH36v4rCJX5WKuTgko7sR1XIL1iaU36IInGtw== X-Google-Smtp-Source: ABdhPJxtISbwoAPA4/f8pKMubkFEjP8BsCANvKL+r86oM6j9mMbRYcbRvXOveb7hiF8ngnC7pIRMBDr8ofGjDdQzwLw= X-Received: by 2002:a05:600c:28b:: with SMTP id 11mr3101421wmk.98.1612264211771; Tue, 02 Feb 2021 03:10:11 -0800 (PST) MIME-Version: 1.0 References: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> <1611737738-1493-3-git-send-email-anshuman.khandual@arm.com> In-Reply-To: <1611737738-1493-3-git-send-email-anshuman.khandual@arm.com> From: Mike Leach Date: Tue, 2 Feb 2021 11:10:01 +0000 Message-ID: Subject: Re: [PATCH V3 02/14] coresight: Do not scan for graph if none is present To: Anshuman Khandual X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_061015_229308_BF273911 X-CRM114-Status: GOOD ( 21.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Poirier , "Suzuki K. Poulose" , Coresight ML , Linux Kernel Mailing List , linux-arm-kernel , Linu Cherian 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 Hi Ansuman, On Wed, 27 Jan 2021 at 08:55, Anshuman Khandual wrote: > > From: Suzuki K Poulose > > If a graph node is not found for a given node, of_get_next_endpoint() > will emit the following error message : > > OF: graph: no port node found in / > > If the given component doesn't have any explicit connections (e.g, > ETE) we could simply ignore the graph parsing. > > Cc: Mathieu Poirier > Cc: Mike Leach > Signed-off-by: Suzuki K Poulose > Signed-off-by: Anshuman Khandual > --- > drivers/hwtracing/coresight/coresight-platform.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c > index 3629b78..c594f45 100644 > --- a/drivers/hwtracing/coresight/coresight-platform.c > +++ b/drivers/hwtracing/coresight/coresight-platform.c > @@ -90,6 +90,12 @@ static void of_coresight_get_ports_legacy(const struct device_node *node, > struct of_endpoint endpoint; > int in = 0, out = 0; > > + /* > + * Avoid warnings in of_graph_get_next_endpoint() > + * if the device doesn't have any graph connections > + */ > + if (!of_graph_is_present(node)) > + return; The problem here is that you are masking genuine errors. The solution is to either call this only if the device type is one that ports are not required - i.e. ETE, or upgrade the .dts bindings for the rest of the ETM devices to yaml so that the ports requirement is checked and validated there. Regards Mike > do { > ep = of_graph_get_next_endpoint(node, ep); > if (!ep) > -- > 2.7.4 > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel