Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1039482imi; Fri, 1 Jul 2022 01:32:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sw5RLGZevzckv3Xl1fUYE19T6Hx+whIScq/0P0hF/7wDhGWbdz4IVRw3b/DxH1etvrXvnd X-Received: by 2002:a17:906:f84:b0:711:eda5:db31 with SMTP id q4-20020a1709060f8400b00711eda5db31mr12899201ejj.397.1656664321977; Fri, 01 Jul 2022 01:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656664321; cv=none; d=google.com; s=arc-20160816; b=uQmsnbEvqrz7NMvr1WtEj3j7+dTKNyLxUXaEhynG9TTVrEjsOWQMsycvJ6jN5poQN7 nmU6cWmlFu3EsnHSipMurwYet3Jfu1/N+zZ20w3GuJc9XKTyc5VrMKv6cOXuxDy088Tj vf6uB9tmS5zJtHr349VkI2kwSUqMS+idxVH9+xmGTJPsS4pveYaa7YbR/DuuCdLcCpYs w+r5wPQ/a5juuXJgaxSHapSCe7YNqaBSd61mdWzOSQ5sSX+k/J4660C0NEKHJTXPSd4e J+TIga4yQjPnZ3ujH0QrW2c4cVXQ4YWN0/6z4HrZv4zkQGXADrvOU1frcLUgjpB2OYYV FftA== 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; bh=b36GzMWyZ+B5pJeIXpOWUar+t32MbUtjaNf9+EBzdK8=; b=KFzfyKBRQTMAAGMffGaQjU7cZ7C9XKNqT5yoA3qX9L10BEUUuBY0h1CIeQvL8O1Z8+ 9TLTpkAb/VuakCr+bS1p2kIpewkzhcLN77qxcOrDLpoCCebChcmzAhdHYg5FZgnseS1X P6VjvwJv/lHhxjsAC7zOLj5azU7jLSQoJjUWQAVndbUXUG/XNGByQroDRWy43Y9O1hI+ 0BJdmLWBdIXTDmDzVlvU4uvXGx9SyZGBjljWYqnFveMK+NSq+9cHlTbChDDOMoAB0Ia/ A1CdJjc/v8nwpP2ObxnY0XIMXIOdedRWNYNruwxbXsxkQRmciFi6OCeHQI0AIKs6/G1Q kuRw== 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 r6-20020a05640251c600b00435924b0ba7si2769806edd.580.2022.07.01.01.31.37; Fri, 01 Jul 2022 01:32:01 -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 S235315AbiGAHqo (ORCPT + 99 others); Fri, 1 Jul 2022 03:46:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbiGAHqi (ORCPT ); Fri, 1 Jul 2022 03:46:38 -0400 Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com [209.85.160.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 024F953D33; Fri, 1 Jul 2022 00:46:38 -0700 (PDT) Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-1048b8a38bbso2458235fac.12; Fri, 01 Jul 2022 00:46:37 -0700 (PDT) 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=b36GzMWyZ+B5pJeIXpOWUar+t32MbUtjaNf9+EBzdK8=; b=EFgo6LmCmfM6xn+qg3fV66RwzyzYyhWQba5go3m41dbIlGNZC35+ksncDTF9KbmPPG CPVVb1OVJ2qpH6J0Y55TpaJQg+I6Mfdj8J18w0oE3U/oN/HmptkHwJzRbwP6RJu3tu+2 QvIKYW/NLfb4xGYEifMN3qUxXgfEUH3yQLIHO874KhwJF/Oh979/rPSupFTLVBIYEn06 07ilr3kFSzNEBx9z6ylPE2Z44WeuUoyAJaDkVM07JAq/MMM6G3cgcN0kmu1HcTCE4X3c D2qzXooU3w0cPRLZp2FHv856Z59kOnDvVaF8J1rTIadV6jexnFMdY1GweVRfNZru2qRw e9jw== X-Gm-Message-State: AJIora82VNKtYFiddkpb/BQkGA5EaoSrSNrNTAIvauczxB6ky7EPEtKc jprgs/rFHDaXHtPRu49uVd8bptN1UZb0Rw== X-Received: by 2002:a05:6870:a115:b0:10b:b089:abb6 with SMTP id m21-20020a056870a11500b0010bb089abb6mr2376527oae.140.1656661596714; Fri, 01 Jul 2022 00:46:36 -0700 (PDT) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com. [209.85.210.52]) by smtp.gmail.com with ESMTPSA id x35-20020a056870a7a300b00101c9597c6fsm14168830oao.28.2022.07.01.00.46.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jul 2022 00:46:36 -0700 (PDT) Received: by mail-ot1-f52.google.com with SMTP id q18-20020a9d7c92000000b00616b27cda7cso1247948otn.9; Fri, 01 Jul 2022 00:46:36 -0700 (PDT) X-Received: by 2002:a81:1c4b:0:b0:31c:5f22:6bd3 with SMTP id c72-20020a811c4b000000b0031c5f226bd3mr1406855ywc.47.1656661147084; Fri, 01 Jul 2022 00:39:07 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> <20220601070707.3946847-2-saravanak@google.com> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 1 Jul 2022 09:38:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/9] PM: domains: Delete usage of driver_deferred_probe_check_state() To: Saravana Kannan Cc: Tony Lindgren , Rob Herring , 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 Mailing List , Linux PM list , Linux IOMMU , netdev , "open list:GPIO SUBSYSTEM" , Alexander Stein Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Saravana, On Fri, Jul 1, 2022 at 1:11 AM 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? > > Geert, thoughts on whether this is a correct use of simple-pm-bus device? Well, if the hardware is wired that way... It's not that dissimilar from CPU cores, and interrupt and GPIO controllers in power domains and clocked by controllable clocks: you can cut the branch you're sitting on, and you have to be careful when going to sleep, and make sure your wake-up sources are still functional. > Also, how is the power domain attach/get working in this case? As far > as I can tell, at least for "simple-pm-bus" devices, the pm domain > attachment is happening under: > really_probe() -> call_driver_probe -> platform_probe() -> > dev_pm_domain_attach() > > So, how is the pm domain attach succeeding in the first place without > my changes? That's a software thing ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds