Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp160680pxb; Fri, 15 Jan 2021 09:46:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgDmgEqEMWirnFZRS6nZPf2lnD8RRzqKQu32VIfQlyoWICVvm08ET60Eke7/ZhIuR8GEud X-Received: by 2002:a17:906:39d0:: with SMTP id i16mr3374308eje.18.1610732813756; Fri, 15 Jan 2021 09:46:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610732813; cv=none; d=google.com; s=arc-20160816; b=BEo2Pj59elLL34BVDoz3JYijbcoVHOZKSNH6vRSV5ZcAHikn3fddPpPf3Mhfcnqbw3 oIUcSMoJY5+T4ZxAR63BdHaQC9jpwx26SEarMhlwmK3B2M2RpVLfGprgbSACNlPWRqtp 4y/TCo25vQFvzvvyf/6G7pACpzG51TUeTKQGbmv2RdBR5hbk6SxNBgctsQU1kGKtas9R ZEQzBDl8p1aEXoC8SaA044Qu80c1HyGoOVuYFSGBPVeqINxNZxh+723vlkQBTu3k6GdQ PLfdehbMAvxEPZZepSER3imlq6alwAu2zDdVgWlYxgO5a4lyw7XvURuBW2+6gLIuEzkF x3lA== 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=tM4MaXgvTZAlvr1leXTujrQPLxqm/ubLgNUK1RNGKmU=; b=nPlsuQIcmavL3PXExm6FQkfKsy1qfn9KIMYc0OCpPpCK2T3HEdLT6GWpjFiNCl34gl 7/+B3WGi4Ok8Ec49jq8qps/ZiwJJ/6JgRjrqcCNzk/u3QqAwa+yOR+i82VtX1BbjEpxD NK24QqrxcKfpSjJQdOx1JeSi7po069nSTbCSr5HDCkq/Z6Jm+S/jQCfs1S+HOJScDkFc +kHTmO2ZuGQolu8GPhsDSEaLGKfesX9pTN+FMcjhqWBlV0twsi7wc6pBwxPXRYNj8ktW PVcEn2PBRQYCmwU8uTkpoXoj6QTI9gFTrbkmiyOwf1WQBTyypaQjO3OLIViwcwA44hi/ OmbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=C6TxA79S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce16si4179625ejb.245.2021.01.15.09.46.29; Fri, 15 Jan 2021 09:46:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=C6TxA79S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbhAORpe (ORCPT + 99 others); Fri, 15 Jan 2021 12:45:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbhAORpd (ORCPT ); Fri, 15 Jan 2021 12:45:33 -0500 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A871CC0613D3 for ; Fri, 15 Jan 2021 09:44:52 -0800 (PST) Received: by mail-yb1-xb2b.google.com with SMTP id o144so5800796ybc.0 for ; Fri, 15 Jan 2021 09:44:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tM4MaXgvTZAlvr1leXTujrQPLxqm/ubLgNUK1RNGKmU=; b=C6TxA79SS2UHJZWdjOMsdX5j68QB687xUftG/IEQRsXZBbcqHTKLZqBvIQQ/f3tPLt KisHSDb8dANHLMht8Ztl6L5lBkGSbu8V2hwlXHfu4I2csQYrvaxrsYFh8P/9WPPe4vTP pb78VMwiNnqt169FBuqm8h0oJl7wrovy6XUFuW0bRVH5dAQpIv9akaF8wtjhlFpr9zbc uRJ4sG88aJZ8bEc8lu/6CqoGgu5soHlqnUsj3HhZABuF3U7kecNGmBxAaF7AgOzRFpMg kMCWsnrfADjqTuz/lccK25DnmtFHhlmO+hqDV1HyxIlXcPoqYaq+5XqKUBloIn+IQKD3 10JQ== 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=tM4MaXgvTZAlvr1leXTujrQPLxqm/ubLgNUK1RNGKmU=; b=ZYIWh4KqohZbDr0J3xIDT5TTN9VB0AmhUMiy4eM7EpOXzfWms/BucdubevQsZQCcLf NDv8MKUN+Z4N+a5oxAEFDNeT3teeFfpjpMBXtlPHR9kL9TcNJXM53zMtwMzwz0Iy/i7O PHD3pHShCurIpMCKm3w23jthtoIYUkb5BXHuruECACFSOoZRYHgQ4brSWZEQYGk86Vw9 VtRoCsWUlv82iny9+PkrERu47n3LS8tVIeTGkTjMqyxFEauMYpODiuIwMZFdDDeOR/5p /4941Wbl/xkt9PNgZxYsOtetpHUAEJF4xgMuj/AniEtTwleo2YervhJtozysUT48KMIl I0qQ== X-Gm-Message-State: AOAM5333JpG+o1lLd4aBc5kVu53biZzCiMAIx+JORJUq91P3zdreuRt1 YaRK/n+w1ZI6/34CHU48bHtz36O+7v5aQtV8x4Sa4Q== X-Received: by 2002:a25:c343:: with SMTP id t64mr4791124ybf.228.1610732691634; Fri, 15 Jan 2021 09:44:51 -0800 (PST) MIME-Version: 1.0 References: <20201218031703.3053753-1-saravanak@google.com> <17703ac8-2238-0b64-3c98-ddadc7ae8a36@nvidia.com> In-Reply-To: From: Saravana Kannan Date: Fri, 15 Jan 2021 09:44:15 -0800 Message-ID: Subject: Re: [PATCH v1 0/5] Enable fw_devlink=on by default To: Jon Hunter Cc: Marc Zyngier , Greg Kroah-Hartman , "Rafael J. Wysocki" , Android Kernel Team , LKML , Jisheng Zhang , Kevin Hilman , John Stultz , Nicolas Saenz Julienne , linux-tegra Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 8:13 AM Jon Hunter wrote: > > > On 14/01/2021 21:50, Saravana Kannan wrote: > > On Thu, Jan 14, 2021 at 10:55 AM Jon Hunter wrote: > >> > >> > >> On 14/01/2021 16:52, Saravana Kannan wrote: > >> > >> ... > >> > >>> Thanks! I think you forgot to enable those logs though. Also, while > >>> you are at it, maybe enable the logs in device_link_add() too please? > >> > >> > >> Sorry try this one. > >> > >> Cheers > >> Jon > > > > Phew! That took almost 4 hours to debug on the side! I think I figured > > it out. Can you try this patch? If it works or improves things, I'll > > explain why it helps. > > > > -Saravana > > > > diff --git a/drivers/of/property.c b/drivers/of/property.c > > index 5f9eed79a8aa..1c8c65c4a887 100644 > > --- a/drivers/of/property.c > > +++ b/drivers/of/property.c > > @@ -1258,6 +1258,8 @@ DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5", NULL) > > DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL) > > DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL) > > DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL) > > +DEFINE_SIMPLE_PROP(gpio_compat, "gpio", "#gpio-cells") > > +DEFINE_SIMPLE_PROP(gpios_compat, "gpios", "#gpio-cells") > > DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) > > DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") > > DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells") > > @@ -1296,6 +1298,8 @@ static const struct supplier_bindings > > of_supplier_bindings[] = { > > { .parse_prop = parse_pinctrl6, }, > > { .parse_prop = parse_pinctrl7, }, > > { .parse_prop = parse_pinctrl8, }, > > + { .parse_prop = parse_gpio_compat, }, > > + { .parse_prop = parse_gpios_compat, }, > > { .parse_prop = parse_regulators, }, > > { .parse_prop = parse_gpio, }, > > { .parse_prop = parse_gpios, }, > > > > Thanks, that worked! > > Tested-by: Jon Hunter > > Thanks for digging into that one. Would have taken me more than 4 hours! Thanks for testing. What was happening was that there was a cycle of 2-3 devices. A -(depends on)-> B -> C -> A. And fw_devlink only understood A -> B since the rest were the gpio bindings I added above. Without fw_devlink seeing the cycle, it can't do cycle workarounds. So C's driver was deferring probe waiting on A and none of them probed. Once I added these and made the cycle visible to fw_devlink, it handled it fine (basically between A, B and C, the device links don't affect probe order anymore). -Saravana