Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5560611iog; Thu, 23 Jun 2022 00:06:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vrudF71xFWgdVlAgcas1UlDU+/QKPCS/oTdkIZsXOZOg1WOIId8wNdXOJ2UmXxJ3273vW8 X-Received: by 2002:a62:aa10:0:b0:525:22bb:b028 with SMTP id e16-20020a62aa10000000b0052522bbb028mr20404349pff.21.1655968018577; Thu, 23 Jun 2022 00:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655968018; cv=none; d=google.com; s=arc-20160816; b=FgD1/wnMlvJPBUy3fh0cq8irtKh+2/QfbZFofEkGH/LOIXVNvlOuUHrDo7fRs/cwUA r7OzNllhbaPO/VDPlsnn1wAcxXAdILD3O3sQfZ6aqsapGzg1rSzJGASU4CYXOZc38zgD IAYh5zcdXldD1IJB/p622x+jxN4YT9kEgVHJULtMzEbSF4wmVTngihZsp+h+UjScvAV+ RIpyT3JEqfp5+q4Op9xvcIlyr3EwZc2Livqjc9aPpbIUS7X4xZ3UtsQNuprvCs1BwBhX RKw5cSN7qXBYp8oJCvK1PpXen8aS8TgzH/4XDgkWRW5XzM0HEE8DdWr2uiSHW+zXdz0v btng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=pwHgTip8Hygaz5d0v2QXB+xasra7oIZb5ohrk0acung=; b=eNfdiN8pZCo+vT7sfIjg7cv7O7Tl1GJpj8yipHH+2fXGBPFeS8J9MgT/vhGuMZ5TQe pxUCWvD5AC8yzSmmEkiwRJP66/UapvlGb0xrLzAcIz30B5BhTx5stC8a7/0l3WqsVyFU 4PMrKy0M3YiNQ1Os5EXs+oB6UVtAYIrGq7YiLYnOJMzAqDYBzOcuJvjekBV+B+HFiI9B 4L04+Hm+bnWlbyaeJF79TUrpNszM7oUpXqE6R62cZdruFjPfQd/l2l3+9ElcZcQPSKqx dqhDeKlci1lSDVFcc4jF+nrD83TF4mjxdmvwknHEqv1iNt5H7Jgeq18KIDZfAdZSnykH i/wA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s9-20020a056a00194900b0051b9d2bc523si27980642pfk.253.2022.06.23.00.06.46; Thu, 23 Jun 2022 00:06:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbiFWHBx (ORCPT + 99 others); Thu, 23 Jun 2022 03:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiFWHBv (ORCPT ); Thu, 23 Jun 2022 03:01:51 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6103645065; Thu, 23 Jun 2022 00:01:50 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B6087804D; Thu, 23 Jun 2022 06:56:47 +0000 (UTC) Date: Thu, 23 Jun 2022 10:01:48 +0300 From: Tony Lindgren To: Saravana Kannan Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Len Brown , Pavel Machek , Joerg Roedel , Will Deacon , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Linus Walleij , Hideaki YOSHIFUJI , David Ahern , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, iommu@lists.linux-foundation.org, netdev@vger.kernel.org, linux-gpio@vger.kernel.org, Geert Uytterhoeven Subject: Re: [PATCH v2 1/9] PM: domains: Delete usage of driver_deferred_probe_check_state() Message-ID: References: <20220601070707.3946847-1-saravanak@google.com> <20220601070707.3946847-2-saravanak@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Saravana Kannan [220622 19:05]: > On Tue, Jun 21, 2022 at 9:59 PM Tony Lindgren wrote: > > > > Hi, > > > > * Saravana Kannan [220621 19:29]: > > > On Tue, Jun 21, 2022 at 12:28 AM Tony Lindgren wrote: > > > > > > > > Hi, > > > > > > > > * Saravana Kannan [700101 02:00]: > > > > > Now that fw_devlink=on by default and fw_devlink supports > > > > > "power-domains" property, the execution will never get to the point > > > > > where driver_deferred_probe_check_state() is called before the supplier > > > > > has probed successfully or before deferred probe timeout has expired. > > > > > > > > > > So, delete the call and replace it with -ENODEV. > > > > > > > > Looks like this causes omaps to not boot in Linux next. > > > > > > Can you please point me to an example DTS I could use for debugging > > > this? I'm assuming you are leaving fw_devlink=on and not turning it > > > off or putting it in permissive mode. > > > > Sure, this seems to happen at least with simple-pm-bus as the top > > level interconnect with a configured power-domains property: > > > > $ git grep -A10 "ocp {" arch/arm/boot/dts/*.dtsi | grep -B3 -A4 simple-pm-bus > > Thanks for the example. I generally start looking from dts (not dtsi) > files in case there are some DT property override/additions after the > dtsi files are included in the dts file. But I'll assume for now > that's not the case. If there's a specific dts file for a board I can > look from that'd be helpful to rule out those kinds of issues. > > For now, I looked at arch/arm/boot/dts/omap4.dtsi. OK it should be very similar for all the affected SoCs. > > This issue is no directly related fw_devlink. It is a side effect of > > removing driver_deferred_probe_check_state(). We no longer return > > -EPROBE_DEFER at the end of driver_deferred_probe_check_state(). > > Yes, I understand the issue. But driver_deferred_probe_check_state() > was deleted because fw_devlink=on should have short circuited the > probe attempt with an -EPROBE_DEFER before reaching the bus/driver > probe function and hitting this -ENOENT failure. That's why I was > asking the other questions. OK. So where is the -EPROBE_DEFER supposed to happen without driver_deferred_probe_check_state() then? > > > > On platform_probe() genpd_get_from_provider() returns > > > > -ENOENT. > > > > > > This error is with the series I assume? > > > > On the first probe genpd_get_from_provider() will return -ENOENT in > > both cases. The list is empty on the first probe and there are no > > genpd providers at this point. > > > > Earlier with driver_deferred_probe_check_state(), the initial -ENOENT > > ends up getting changed to -EPROBE_DEFER at the end of > > driver_deferred_probe_check_state(), we are now missing that. > > Right, I was aware -ENOENT would be returned if we got this far. But > the point of this series is that you shouldn't have gotten that far > before your pm domain device is ready. Hence my questions from the > earlier reply. OK > Can I get answers to rest of my questions in the first reply please? > That should help us figure out why fw_devlink let us get this far. > Summarize them here to make it easy: > * Are you running with fw_devlink=on? Yes with the default with no specific kernel params so looks like FW_DEVLINK_FLAGS_ON. > * Is the"ti,omap4-prm-inst"/"ti,omap-prm-inst" built-in in this case? Yes > * If it's not built-in, can you please try deferred_probe_timeout=0 > and deferred_probe_timeout=30 and see if either one of them help? It's built in so I did not try these. > * Can I get the output of "ls -d supplier:*" and "cat > supplier:*/status" output from the sysfs dir for the ocp device > without this series where it boots properly. Hmm so I'm not seeing any supplier for the top level ocp device in the booting case without your patches. I see the suppliers for the ocp child device instances only. Without your patches I see simple-pm-bus probe initially with EPROBE_DEFER like I described earlier, and then simple-pm-bus probes on the second try. Regards, Tony