Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1143732iog; Thu, 30 Jun 2022 18:27:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sOoOYoQZ+MMvMLgqPRaboK+3oxWa7/c9va2SNgZCOblQpJS9Ran2qtrvpz9yuCyycF8RG2 X-Received: by 2002:a05:6a00:8cf:b0:522:93a6:46e9 with SMTP id s15-20020a056a0008cf00b0052293a646e9mr17756053pfu.62.1656638852293; Thu, 30 Jun 2022 18:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656638852; cv=none; d=google.com; s=arc-20160816; b=JVHJSIFxFkmdEiXmMOf7TN2DjY8sTYXdZQYq85H1JAifa9QY4dIo2mRfsGP+PglZ3l b5Fv/R5jvpr0SIqB7kUZgg12K/GUSgmxdI1zLN9MkYdH9CKBvhFbZVWEqELvrnNGae1S +eNhKdOfXxMw9lGb+62KK2r07ZyUmox9s8flID7P5r7guWFU0EK1Cav4+chR1eJgokwa 0uRtLWHd/fs16U45dHV0cT3syKx8tbdiWkbBUVvqbAxpLU1gzyIpfUi4lEA3DTW5YC6Q 8BXN59GZ6A2MOj8FxySws/RzWSAmHaVPlw6JNI8nmUWE4lYzSB/FYboApm6t78AtZnv2 nWcA== 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=VvnQLRW3jtos30YOXCac41NBCyC2GZh1yMj7tf5Q9R0=; b=yDs0/yTCt+8QEPjuQsjGMty8JhNzWrrdIb2O4JktLQ8tfHRCO3fauU50Vp13WJvOSV rtR4vWFfZbLw+HZ/5vvrb1/q2ynQbmp+uplJQa79LdZJHg07ibitqwFh9Ek6fG4f0iHP h/wNTdJ/f+hBbzBRnHb9XBjSBnA9hsre4AHAvVtizULlx99Bo6sVYSoZLK/5SyaGXMvf KNVvcsZ7ZuMhn9WwrMbx2wPReCQIF3S3tK9In6egQHCbk/4fyVZG+NXlOwQx2nJ27nfM o2ocejzCgD8263SlVGVco7NpkVXe+PwqgpigkBIqVT5bZyvDcPoIvtX/LK1T8DqjokhM sVsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=oyKgnTd4; 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 u11-20020a170902b28b00b00168b33be8c9si1426378plr.451.2022.06.30.18.27.20; Thu, 30 Jun 2022 18:27:32 -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=oyKgnTd4; 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 S230426AbiGAAhz (ORCPT + 99 others); Thu, 30 Jun 2022 20:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiGAAhx (ORCPT ); Thu, 30 Jun 2022 20:37:53 -0400 Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1B314475F for ; Thu, 30 Jun 2022 17:37:51 -0700 (PDT) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-2ef5380669cso9106627b3.9 for ; Thu, 30 Jun 2022 17:37:51 -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=VvnQLRW3jtos30YOXCac41NBCyC2GZh1yMj7tf5Q9R0=; b=oyKgnTd4PpBv38WuQljuauvS82SM3dQlAPCb0vgCngpk91UWhkvTbZ51UyYbfAoPxT emAKlWy7SwOEebwyrY/bBlmJ7gBRqbOBdvj1P9MoQ4xxBvLVL5YPNa172XzXRY2FHp0H w2PV+L3bfaqtsyPtMEvIpSBAPKjV/QZNEyFmJ5sEU1kg24dtrFeUBpECBRoklWoXFZE/ J/YZVng3McgGPZFq/KpeWHT/1N3xNE3GUH3gGkPhKBLhmrhYlOEh2+3RKVhy5pZaPEPH oYcoVGcU8mbLw8UZFRcEzdlq8qpnbjYWAOPuj+WSMPfq5aGJDObMbOGZGGljUFCYxDAr YsXg== 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=VvnQLRW3jtos30YOXCac41NBCyC2GZh1yMj7tf5Q9R0=; b=LFDWu+MY/IWU6cPYA3jCXeav3g11D6SBQ6vWuqw0srmWD8CQndO+Tg94Iv+EGtonvK eUAAJ1dCFGZR6Gr9DZu4O+M4Dkg1BU0mT1okh6p2jNPKLRblxEjXqg3jO0xSkB4u5p3N IwjYbNNevowOTqbQENGtk5/n2sU88uhVHxwcG3nboBXUwFpzsLlFekKYdt2Xk4p3SV6+ vjsfCPpsG9CzK1+7IdVoy4eoWOdSYiuGgCwMQaTyXJvGlTSkeIV3zvHOy8sc8h4107yW v98IAXuYolfKYwWKFtabYZ61e62bC8FV3G1JmNYcZqrc70tO3tSVWatlK23UXJj4ADpT HaqA== X-Gm-Message-State: AJIora/okBe+pLdzBRMajnkN0rWPfrSRRX30fPS2A2axOeFsnhovpUSo eFFWKqcK48aRmrIxYnp++HxPTkZFMHuvDbtFmyIQLA== X-Received: by 2002:a0d:ca16:0:b0:31b:7adf:d91 with SMTP id m22-20020a0dca16000000b0031b7adf0d91mr13637664ywd.455.1656635871014; Thu, 30 Jun 2022 17:37:51 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> <20220601070707.3946847-2-saravanak@google.com> <4799738.LvFx2qVVIh@steina-w> In-Reply-To: <4799738.LvFx2qVVIh@steina-w> From: Saravana Kannan Date: Thu, 30 Jun 2022 17:37:14 -0700 Message-ID: Subject: Re: [PATCH v2 1/9] PM: domains: Delete usage of driver_deferred_probe_check_state() To: Alexander Stein Cc: Tony Lindgren , 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 Content-Type: multipart/mixed; boundary="0000000000009dba6c05e2b398fc" 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=unavailable 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 --0000000000009dba6c05e2b398fc Content-Type: text/plain; charset="UTF-8" On Thu, Jun 23, 2022 at 5:08 AM Alexander Stein wrote: > > Hi, > > Am Dienstag, 21. Juni 2022, 09:28:43 CEST schrieb Tony Lindgren: > > 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. With this > > simple-pm-bus fails to probe initially as the power-domain is not > > yet available. On platform_probe() genpd_get_from_provider() returns > > -ENOENT. > > > > Seems like other stuff is potentially broken too, any ideas on > > how to fix this? > > I think I'm hit by this as well, although I do not get a lockup. > In my case I'm using arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dts > and probing of 38320000.blk-ctrl fails as the power-domain is not (yet) > registed. Ok, took a look. The problem is that there are two drivers for the same device and they both initialize this device. gpc: gpc@303a0000 { compatible = "fsl,imx8mq-gpc"; } $ git grep -l "fsl,imx7d-gpc" -- drivers/ drivers/irqchip/irq-imx-gpcv2.c drivers/soc/imx/gpcv2.c IMHO, this is a bad/broken design. So what's happening is that fw_devlink will block the probe of 38320000.blk-ctrl until 303a0000.gpc is initialized. And it stops blocking the probe of 38320000.blk-ctrl as soon as the first driver initializes the device. In this case, it's the irqchip driver. I'd recommend combining these drivers into one. Something like the patch I'm attaching (sorry for the attachment, copy-paste is mangling the tabs). Can you give it a shot please? -Saravana --0000000000009dba6c05e2b398fc Content-Type: application/x-patch; name="0001-combine-drivers.patch" Content-Disposition: attachment; filename="0001-combine-drivers.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l51q58ij0 RnJvbSAwOGI4Nzk1YjYzMDBkZTg5NTAyYTI2YmEzMzQ3YjJlNTRkNDMzODFkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTYXJhdmFuYSBLYW5uYW4gPHNhcmF2YW5ha0Bnb29nbGUuY29t PgpEYXRlOiBUaHU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