Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp172917imn; Fri, 1 Jul 2022 12:24:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sPGTnh1QNp+QL7uvk7YM9c67tJcRs4XKdxHnLCtGAJU8PbhXitQr3pU8aiWwNbImRK1RZF X-Received: by 2002:a17:903:2585:b0:16a:3c86:c76b with SMTP id jb5-20020a170903258500b0016a3c86c76bmr21631283plb.88.1656703493040; Fri, 01 Jul 2022 12:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656703493; cv=none; d=google.com; s=arc-20160816; b=I1Z0HLHTiQ+zz/iXFdUsSBbDiflZe4Fv9AcMe6d+IHVyHFXVvK8uxy9dDwhnR5wK63 IP6PtPYFPbXwEc0j2rL21tons6LHXrtKNCsK2v35HsuNLrhlh1dC44Kj3acSmu0Z7aV0 mnhxwNGpKoszIXJ/WmilMaUV1kqEA4+N0aYvu75c2db0nhMs+t3U0QjzoPSde4DqJY+d Uvp5IU5FZSOg4KqE4ZNEexH/uN71EPI/drR4G3foY8RqTyMZn5YGtb+MNiMuJXpR1i37 a1xtf/ZcCJ2W0Q6QGWFmOKEHsei0pvqy3mgqCL/dki+buylgVJnqf99BpTMzEkSL066Y cVJg== 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=0QS+dcPV5O8kLzr2+REcEkzxVnC/iy1E7v+r8knheu0=; b=Ijt9TyhvheyQiQmpKwt87jEojB2alZCvqAGkVQy4304C8KbmDEeZoJsbzmTmXW9O2m uajfubUPZzljXyAIarZNvnmbTe5AkxjitoyuNqzC0/bojtNx1aUY5HgAXy7neiq98wRt xCr/hqO+FFNXRG9Hajt6GWO830l2A4LGlrGGxiYexZLWbV80fhrRiJm7P5vTCHy9T8if ufD8gnOVkyBQob7eBj0NlzYkS5W1xiQSPeWmjQHX/c9bqQBu1pAaQpXmHK3OsuFp364i kRWIE2FC73IbCHD/aQJLBcFHvWSKZXqViQ/ktIbBj1/SkAoPb+qcedR5acNzBd4MpQnm Izfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="YxJMJqn/"; 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 37-20020a631765000000b0040ddd26512bsi21755459pgx.856.2022.07.01.12.24.39; Fri, 01 Jul 2022 12:24:53 -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="YxJMJqn/"; 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 S229508AbiGATN4 (ORCPT + 99 others); Fri, 1 Jul 2022 15:13:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbiGATNz (ORCPT ); Fri, 1 Jul 2022 15:13:55 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7482393D6 for ; Fri, 1 Jul 2022 12:13:53 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id 194so624387ybc.4 for ; Fri, 01 Jul 2022 12:13:53 -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=0QS+dcPV5O8kLzr2+REcEkzxVnC/iy1E7v+r8knheu0=; b=YxJMJqn/vOk+95wW9H3XyxhU7b6ot8wJfR5j/hJXXANi9ACWI8OWpYLc7idqKtR70V I3f03mBuDThOJwgTtewRvSXUMPEEQyG2ilkW3LrxcIy7/7G+z/lvGEKEHqAw36hYhA+D 6ECYWOChAVa+UxOkE+iS+daPXf69U0SflOW9HtDhl9SR2FAyXKxcYvKm3CgyTVMStMHC d3loWbDJUvP5cApZmY9sk39gsPipm7VWUwXpJ6tYDGtPK2MW5LBo5X+RScgoYXv7fbLo O9phoX29OCjJ0I+QGlNLfK3+Itz44Me8/dSf5Psw1rGo4PvdspD0oJiqYd3r+D2c9F2x uSLQ== 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=0QS+dcPV5O8kLzr2+REcEkzxVnC/iy1E7v+r8knheu0=; b=XewzjScaLtksfze0++PN7JWGptMWkabZ2zXqQpTZ5Kyyy3GVeDgEjLMbnQ5SDWtypi 2BcPjdAuA/KRhm2Eir0rlvpLRcCwPNsATmoYEz7Zda2F0rCUCb7qjVQFL7xDG8m3LT3C ijd4jrvQSd2ESiyr+PiVUghPIRnHiTNU2fopVtavE1pwz53j/wnDJrch5uMKXw6PJJeq D1N1JxDJFYRYH6ZxBE8Ba1MmiZR/uRyDbqpg2STPcSWFRgZn5boLv0obDtaGkYLjQ4xt Dbvn0SbG8OFFa8Q4QCcN579yX/ZXGe0Cm70Ph9vZg9OdyjZz+fKbph7mdEwik9gjZOxH y4DQ== X-Gm-Message-State: AJIora/JV4xLnIXgPQm4x21ijoZGTRAEbTyEQO4YOkBsGXfv+e69Vk9z /QW1XEGEb1c0pY+hP8Synskj+sCRgjZZNj+04VKogw== X-Received: by 2002:a25:5bc3:0:b0:669:b722:beb8 with SMTP id p186-20020a255bc3000000b00669b722beb8mr16783331ybb.447.1656702832727; Fri, 01 Jul 2022 12:13:52 -0700 (PDT) MIME-Version: 1.0 References: <20220701150848.75eeprptmb5beip7@bogus> In-Reply-To: <20220701150848.75eeprptmb5beip7@bogus> From: Saravana Kannan Date: Fri, 1 Jul 2022 12:13:16 -0700 Message-ID: Subject: Re: [PATCH v2 1/9] PM: domains: Delete usage of driver_deferred_probe_check_state() To: Sudeep Holla Cc: Tony Lindgren , Rob Herring , 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=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 On Fri, Jul 1, 2022 at 8:08 AM Sudeep Holla wrote: > > Hi, Saravana, > > On Fri, Jul 01, 2022 at 01:26:12AM -0700, Saravana Kannan wrote: > > [...] > > > Can you check if this hack helps? If so, then I can think about > > whether we can pick it up without breaking everything else. Copy-paste > > tab mess up warning. > > Sorry for jumping in late and not even sure if this is right thread. > I have not bisected anything yet, but I am seeing issues on my Juno R2 > with SCMI enabled power domains and Coresight AMBA devices. > > OF: amba_device_add() failed (-19) for /etf@20010000 > OF: amba_device_add() failed (-19) for /tpiu@20030000 > OF: amba_device_add() failed (-19) for /funnel@20040000 > OF: amba_device_add() failed (-19) for /etr@20070000 > OF: amba_device_add() failed (-19) for /stm@20100000 > OF: amba_device_add() failed (-19) for /replicator@20120000 > OF: amba_device_add() failed (-19) for /cpu-debug@22010000 > OF: amba_device_add() failed (-19) for /etm@22040000 > OF: amba_device_add() failed (-19) for /cti@22020000 > OF: amba_device_add() failed (-19) for /funnel@220c0000 > OF: amba_device_add() failed (-19) for /cpu-debug@22110000 > OF: amba_device_add() failed (-19) for /etm@22140000 > OF: amba_device_add() failed (-19) for /cti@22120000 > OF: amba_device_add() failed (-19) for /cpu-debug@23010000 > OF: amba_device_add() failed (-19) for /etm@23040000 > OF: amba_device_add() failed (-19) for /cti@23020000 > OF: amba_device_add() failed (-19) for /funnel@230c0000 > OF: amba_device_add() failed (-19) for /cpu-debug@23110000 > OF: amba_device_add() failed (-19) for /etm@23140000 > OF: amba_device_add() failed (-19) for /cti@23120000 > OF: amba_device_add() failed (-19) for /cpu-debug@23210000 > OF: amba_device_add() failed (-19) for /etm@23240000 > OF: amba_device_add() failed (-19) for /cti@23220000 > OF: amba_device_add() failed (-19) for /cpu-debug@23310000 > OF: amba_device_add() failed (-19) for /etm@23340000 > OF: amba_device_add() failed (-19) for /cti@23320000 > OF: amba_device_add() failed (-19) for /cti@20020000 > OF: amba_device_add() failed (-19) for /cti@20110000 > OF: amba_device_add() failed (-19) for /funnel@20130000 > OF: amba_device_add() failed (-19) for /etf@20140000 > OF: amba_device_add() failed (-19) for /funnel@20150000 > OF: amba_device_add() failed (-19) for /cti@20160000 > > These are working fine with deferred probe in the mainline. > I tried the hack you have suggested here(rather Tony's version), Thanks for trying that. > also > tried with fw_devlink=0 and fw_devlink=1 0 and 1 aren't valid input to fw_devlink. But yeah, I don't expect disabling it to make anything better. > && fw_devlink.strict=0 > No change in the behaviour. > > The DTS are in arch/arm64/boot/dts/arm/juno-*-scmi.dts and there > coresight devices are mostly in juno-cs-r1r2.dtsi Thanks > Let me know if there is anything obvious or you want me to bisect which > means I need more time. I can do that next week. I'll let you know once I poke at the DTS. We need to figure out why fw_devlink wasn't blocking these from getting to the error (same as in Tony's case). But since these are amba devices, I think I have some guesses. This is an old series that had some issues in some cases and I haven't gotten around to looking at it. You can give that a shot if you can apply it to a recent tree. https://lore.kernel.org/lkml/20210304195101.3843496-1-saravanak@google.com/ After looking at that old patch again, I think I know what's going on. For normal devices, the pm domain attach happens AFTER the device is added and fw_devlink has had a chance to set up device links. And if the suppliers aren't ready, really_probe() won't get as far as dev_pm_domain_attach(). But for amba, the clock and pm domain suppliers are "grabbed" before adding the device. So with that old patch + always returning -EPROBE_DEFER in amba_device_add() if amba_read_periphid() fails should fix your issue. -Saravana