From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 533F5C433EF for ; Tue, 5 Jul 2022 08:44:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230309AbiGEIor (ORCPT ); Tue, 5 Jul 2022 04:44:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230220AbiGEIoq (ORCPT ); Tue, 5 Jul 2022 04:44:46 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9343FDEC1 for ; Tue, 5 Jul 2022 01:44:44 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id e69so14044990ybh.2 for ; Tue, 05 Jul 2022 01:44:44 -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=2nqg94hUDjf5VEy31mCYebRLyQWKOgGJpJElSft6kJk=; b=oVdJFaZLt6iik+gYVPoDhE3E0/T/qMpp81wNqUxEUTmekiaqU9ynpZ0mDpnp2WD8cV 1XxBK2Tr40GZWioBld+i2V2kPexOZDXUouMVZ8Ta2CmvZ6vewWiUjnGTEovIbce1WKpR nRulH13G0QJpSAV8IrG/vyGQL8xWb2qk/6ax3FTz3YAu5ngRNie2xDTdyn/3wo8LdI4n 4XMCNJA3C+XzvqbqeIqouGJjzVPFaCYGN7b0gBNrXW2dEfwZAh5IeAKq/qf7jDjP6DxQ sJuscQX3dxs/MUyavOF2DrQo82K7EPd+OrV7QEVmkdbS/+lXRLFYmWGyqUhmElgGNChc XHOg== 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=2nqg94hUDjf5VEy31mCYebRLyQWKOgGJpJElSft6kJk=; b=2D1hrS3DAFZrjmO5fOTUiRaLtghXeGH0+hi/yzwkajkZJX7j+M0zTlSzLSI0BP1ol0 3ulSxiCwX9KnZAVqjDC4+J0tB7LqRuBBEHfIXQ0ixiVofQstj/W25AGizIh2kg3zMqEa DYPOwPblPwzHaj2uT65Ij20zdbyo+QeAGUzDdCI4IP5N1+TFdeXv7fLmj9prTpM6ZFx9 PHRzrgGfeUwDHPPkbDa20YaotLU8KjxSNjbI2JG+ipjxZevt8dYydl9sLnF4vHsMmpU0 wPX848zzZeybVrWH1tbZpGr6mpYaNPOfVkoOrddErQ8PwIkHRxLA5q5UlELj0+TmvFr4 RkpQ== X-Gm-Message-State: AJIora/CC69lBmPujDk9oSzVXyrjcR4YCOUzrGKfnzxhtUclbjg5KD8v j9ID2NG7vHoEE/hk0ggFcVvmICMgVJI2GBath3PjaQ== X-Google-Smtp-Source: AGRyM1s3KR9timt0Nv154BBVjZtVup9YxTIdAuMg5rdc0L5tuSQBdw4qLUFuMUr86cFiFJimYkgebSO//Pbzv6BbJEU= X-Received: by 2002:a25:abce:0:b0:66e:38e8:d286 with SMTP id v72-20020a25abce000000b0066e38e8d286mr12961807ybi.447.1657010683689; Tue, 05 Jul 2022 01:44:43 -0700 (PDT) MIME-Version: 1.0 References: <20220701150848.75eeprptmb5beip7@bogus> In-Reply-To: From: Saravana Kannan Date: Tue, 5 Jul 2022 01:44:07 -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" Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Fri, Jul 1, 2022 at 12:13 PM Saravana Kannan wrote: > > 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/ I rebased it to driver-core-next and tested the patch (for correctness, not with your issue though). I'm fairly sure it should help with your issue. Can you give it a shot please? https://lore.kernel.org/lkml/20220705083934.3974140-1-saravanak@google.com/T/#u -Saravana > > 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