Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1080290iog; Thu, 30 Jun 2022 16:49:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1shCI2vz6mJvCWf4XJxa2a5tkFDzloB1ucOrXIu21iJzQpofSdHmF4K8tzFdYi30w87QWFh X-Received: by 2002:a63:af56:0:b0:40d:2430:8fa3 with SMTP id s22-20020a63af56000000b0040d24308fa3mr10025366pgo.376.1656632943397; Thu, 30 Jun 2022 16:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656632943; cv=none; d=google.com; s=arc-20160816; b=uVXFu+JuNLpRgZq+wqpKq8q0QTlfGFh+IxScZMXb3wrLm+YTH2abopbCdIejqf30jR wtqbFu5r+msxAGHQ4Iq6XOR0SGfPQg5z7oY3k53Kh/mLAccSlx8me6DVMZFMAaZDYlqJ mEz6kt7uNnVc/KkZa2/1V5ZSpuJIdL7LQk5h6o0OHGDc3MC/Eqd2iH8qtGTqS8g+1BUH zMsHjfljTVnoO5QzyJtjjaAhl2i25feRUqAJka36mbqzTX4iV0VJLYgOAKiXbrq9Izp3 dxddcVO7UM+GdtkJQQr7CWqDSGINe3hgEBGzBDq5uzjFNybU/sq/YXKtRPH3KM5at44B bl2g== 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=7rzBjlWyrGCVnHojYy7aloe09Kk1ZJFyFafJ4B59izQ=; b=MgzpM/lyL/Y6ftrPIriPNeugnj7sX+gRzJM4YyQjryXIsOFnSsgIDpGtZiHY8ltN6b lehSCQDTtPQB6PqBuWGmip3FKDQbAJFq5aGB3gc8Wk3d7/Fr2p3lJfvsxMMqJ6ZKSiob 15dZ+phgD3LbDOG98P+LFGpcKnKLvO8nq1iC27q84QLlFfhGpz4b7mtOjCb2QeBpW1c0 vPmJ81grOQnip/fCBZ/A5PIkJYcftuy5tH3NG0AvsrAGNtwVFH13YqkUzKU6YIgOakAO w2S6aEiIJJZSkOIu/Cu4FMiCys+n4gyIkM27ePRChXzGwsWAqmQbmz7rhbgZMBO3y1k9 qn3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=esSzbAG9; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a056a000c8b00b00517c9022a86si29660973pfv.199.2022.06.30.16.48.51; Thu, 30 Jun 2022 16:49:03 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=esSzbAG9; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbiF3XbD (ORCPT + 99 others); Thu, 30 Jun 2022 19:31:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbiF3XbC (ORCPT ); Thu, 30 Jun 2022 19:31:02 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 364FB4506C for ; Thu, 30 Jun 2022 16:31:00 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id i15so1174326ybp.1 for ; Thu, 30 Jun 2022 16:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7rzBjlWyrGCVnHojYy7aloe09Kk1ZJFyFafJ4B59izQ=; b=esSzbAG9SStIKedEdEyPNCZEwWeV7CGfw2gDAyv7xNkZGiGhAKyelsjm5S6l3zYohJ d/Eo0n6Mp+36R9EN/Pq2SisCS+9HoblIrvPkImxxTHiatXxbVEpvW3y/yNgVziC5uyoZ vYyHIRU3pYbXRmHkZLlWk/frQQwicQxGxfoUSBXj3PLfoEnFnvnX+lQNgSCCK/G112nQ +h/LHrk5XRmANsD8K55QOlIqREK2mYKCbE3t0k3EnnSD9DyzGjrrvdjT+EJJoRKX1F7X eGAoOxj+hwQhHxN9wOQ0TOIBLZRRt2Qt2wLPB0KOY9Z/NrqQd5sdoLelt/izUN/UnoDM mZeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7rzBjlWyrGCVnHojYy7aloe09Kk1ZJFyFafJ4B59izQ=; b=KW1W1KqFnAmmLqwWNCe5mJDQwVflssY07gUsj/9ioa/QCGwW9W45yzRPeMIdGPAPZv jGTO5p0u1avUvLqSL137Ikgm/cAinTncc/epQUTCo/D9weCHUebidCnJ/k8SCUlPl6in 7YI1EXsQMY8d3Q1G4ZerQ8MlUB+avTZFMcqOyIYDhFNaPnPorclpm5HXUk6lphbwIGYS LVK2kv1FP1IfgNHemoqk5PChRvxwaKq9PHSldTTPO625ZWktzUMJzLA51WG4nlCStk+y XaLZc4vpus9AMInx/XKjRPqxRGXdQbR0WxrH7/o/ZMQI2hxeLMKw1CgGubH5hmZF/hWv GiXA== X-Gm-Message-State: AJIora9Oz8bM0vicOudkF4xHU7L8EUj474gE/uywEni2XxhJyp7JG6IM cACuww0XvV3+eBad7g5YZr1nV+gCTXFrW+iqDy59cg== X-Received: by 2002:a25:5bc3:0:b0:669:b722:beb8 with SMTP id p186-20020a255bc3000000b00669b722beb8mr12118791ybb.447.1656631859258; Thu, 30 Jun 2022 16:30:59 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> <20220601070707.3946847-2-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Thu, 30 Jun 2022 16:30:23 -0700 Message-ID: Subject: Re: [PATCH v2 1/9] PM: domains: Delete usage of driver_deferred_probe_check_state() To: Rob Herring Cc: Tony Lindgren , Geert Uytterhoeven , 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 , Android Kernel Team , "linux-kernel@vger.kernel.org" , "open list:THERMAL" , Linux IOMMU , netdev , "open list:GPIO SUBSYSTEM" , Alexander Stein Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Thu, Jun 30, 2022 at 4:26 PM Rob Herring wrote: > > On Thu, Jun 30, 2022 at 5:11 PM Saravana Kannan wrote: > > > > On Mon, Jun 27, 2022 at 2:10 AM Tony Lindgren wrote: > > > > > > * Saravana Kannan [220623 08:17]: > > > > On Thu, Jun 23, 2022 at 12:01 AM Tony Lindgren wrote: > > > > > > > > > > * Saravana Kannan [220622 19:05]: > > > > > > On Tue, Jun 21, 2022 at 9:59 PM Tony Lindgren wrote: > > > > > > > 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? > > > > > > > > device_links_check_suppliers() call inside really_probe() would short > > > > circuit and return an -EPROBE_DEFER if the device links are created as > > > > expected. > > > > > > OK > > > > > > > > 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. > > > > > > > > Hmmm... this is strange (that the device link isn't there), but this > > > > is what I suspected. > > > > > > Yup, maybe it's because of the supplier being a device in the child > > > interconnect for the ocp. > > > > Ugh... yeah, this is why the normal (not SYNC_STATE_ONLY) device link > > isn't being created. > > > > So the aggregated view is something like (I had to set tabs = 4 space > > to fit it within 80 cols): > > > > ocp: ocp { <========================= Consumer > > compatible = "simple-pm-bus"; > > power-domains = <&prm_per>; <=========== Supplier ref > > > > l4_wkup: interconnect@44c00000 { > > compatible = "ti,am33xx-l4-wkup", "simple-pm-bus"; > > > > segment@200000 { /* 0x44e00000 */ > > compatible = "simple-pm-bus"; > > > > target-module@0 { /* 0x44e00000, ap 8 58.0 */ > > compatible = "ti,sysc-omap4", "ti,sysc"; > > > > prcm: prcm@0 { > > compatible = "ti,am3-prcm", "simple-bus"; > > > > prm_per: prm@c00 { <========= Actual Supplier > > compatible = "ti,am3-prm-inst", "ti,omap-prm-inst"; > > }; > > }; > > }; > > }; > > }; > > }; > > > > The power-domain supplier is the great-great-great-grand-child of the > > consumer. It's not clear to me how this is valid. What does it even > > mean? > > > > Rob, is this considered a valid DT? > > Valid DT for broken h/w. I'm not sure even in that case it's valid. When the parent device is in reset (when the SoC is coming out of reset), there's no way the descendant is functional. And if the descendant is not functional, how is the parent device powered up? This just feels like an incorrect representation of the real h/w. > So the domain must be default on and then simple-pm-bus is going to > hold a reference to the domain preventing it from ever getting powered > off and things seem to work. Except what happens during suspend? But how can simple-pm-bus even get a reference? The PM domain can't get added until we are well into the probe of the simple-pm-bus and AFAICT the genpd attach is done before the driver probe is even called. -Saravana