Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp999507imw; Tue, 5 Jul 2022 01:55:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uc9s2akR57fOdrj8g1gI8+fs1lvdXfJod//m2Hpfqt97ida7GaXuCadLmLJnxzg2HD3z67 X-Received: by 2002:a17:907:75c8:b0:72a:4b50:b029 with SMTP id jl8-20020a17090775c800b0072a4b50b029mr30321826ejc.394.1657011353689; Tue, 05 Jul 2022 01:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657011353; cv=none; d=google.com; s=arc-20160816; b=QcLvuEZM41ZeCZKvmgP4msuM+bOW/tFZpiguA3S4yvrQx3MzzN/QatEKVfU2yruFg4 CiQnMK9oidzAyhoB0Gxun6JFV/QL6wTS9TNSb9z/xdP3fy+M4Qbi2FpqBNoHZ+5AsEFD PJO89Ot+rn2xqeEFf9B8OTWV9hfFf9/nl+7JixNGxg4NSh5Na9f+cDFCm49NBpe9ETTd pztbqqTD19kby/TwtmXCB+aE8OE3Hzv/xFykkc0/TbrQYeL+WJ4rqlv1ICLG5Jf8o27o H3QJTa01jg6/FIWXkgQ65cErkI9lgGWLAUXO97KnjYdj1wKo3RGK3hStwtLOB6mOW0V0 Y84Q== 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=2nqg94hUDjf5VEy31mCYebRLyQWKOgGJpJElSft6kJk=; b=MwGzqpmCpkVflDOkgHrpNqC68pTtelspCmu8e4HQ2FhD7om9ajfHq95GTlzVKaBgnU ntLzLR2jBJpXKdOv44CBuRHJuJboVpxeF+Z96LIBcIVCb8i2QQzt6VSUCvMAh7msh/1f HPdZW1bCfwwI9slFWX8HwHnbL/us65cTc+xc+5M7YPfvCxB76JTH53DcMXgt0vVf9I9X pz4MylxCXrx7B805mCO+8uNwgWenQOOQrw5s38gIBw/Bj3mGYXiLdCUc7gPr0UODOawR jZS0aakqp16KCbULE8VW8y2UWet/D/gBrcvb7xyMg2+LxDaGdHupTKXn6twyF8nvtjvH GMeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=oVdJFaZL; 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 cw9-20020a170906478900b00711ca15cd52si42410577ejc.230.2022.07.05.01.55.28; Tue, 05 Jul 2022 01:55: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=oVdJFaZL; 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 S230220AbiGEIor (ORCPT + 99 others); Tue, 5 Jul 2022 04:44:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbiGEIop (ORCPT ); Tue, 5 Jul 2022 04:44:45 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 933B363E7 for ; Tue, 5 Jul 2022 01:44:44 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id i14so895286yba.1 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=eEL4Pcq2LRRfhdDU0gMIGVFSVdxGtSkDoBvwpaatla1Agegx8Gi6H80+CganrXXUzZ jymgCLn0mLqAgdZ1T1bNbExc0Hc2KGZDICg2rsDiQ46bLxFsVR1zk/FmQe8s+jDVyPyN wvExUhUr2cYohGbZayDqzQoc6bsRRnlad9iiPzDfmKMOk/b9wgJD6NFkj38pt06VY2ZL 8BAP5vcxEINmjxu05U3GwwaJaNaiAiDiN1343Wnmf7eXU1fqP3q4yZiPSBjcOuxjieDg SQReYDU87MnZwIXcz3lNcpqku/gdjrxNpIqcls5V0WmUeA0TRwDh5EG5TOKhzhG03/0Y oCdA== X-Gm-Message-State: AJIora8URnCrSL8BzDENtOkok1/9b7Lb+NXqAensfcuq7WX4NQHApU96 w3HWWAjIS65Yzqa/NnhSw+mj39U+rWUUTlrs5fNPXw== 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" 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 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