Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5465131imw; Wed, 20 Jul 2022 06:20:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v4WQ4hrQVULXMk//i4/Xuxnl2DsOgWtPKxAFyEbqMTHhQkdnSKi6fPItfaF/Ud+UYot32s X-Received: by 2002:a05:6870:709e:b0:10d:752a:9ce7 with SMTP id v30-20020a056870709e00b0010d752a9ce7mr2477476oae.233.1658323235116; Wed, 20 Jul 2022 06:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658323235; cv=none; d=google.com; s=arc-20160816; b=xswyFYQJgWU/kCMRwDCZwNoXgrvgGzmAt6FWyRHKjYdwek1qWDVeIyyRgPUhktes57 uk+iiR63HPf1s2c4J+acYxqfgeZXRhDKWNImw0YSVI4B8WspqUYCicMtt5861bMqE8Hv C3d03IK2f/xhpU4c4XRO5W8ejCHdF0dPlJzjbEgpYf1qvIxBrI5yQ2vQCKsie/1fKid6 G97Ju1Hq8IOOT/E19j+k+60HrQ+UNucsrqpTc4LBiSYJTbFbwEMn9qmpKbjGK5SSJw96 b4M1ha5RpkHYRmmgixh5UbW0v/LI5aRd7Wdns3LH1Az0HnsRWMS5v1Wdyqn3XJpxiVK2 opZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ypSVxPTVfmGQyNN0Rk2blC7hsgx9iSb/ljc6/LBqh3Y=; b=DyBiSjl5SXNpV1CHzzGI7dFHaGdz6D5wkrRJtd2epkRy+xre9YqiRsl35My9tWgHig aK2bZXv8XEi5YTBSM5hWAeiSRVhGiojlJS4zBz4DHzZpABz6bKy7jK9TPcAau3L+33Kc D8BQ8D1A5enSK262Hql3n49HzB+wb3eeHNOKg9M7jodXqGfpMncwrkaBp0IR3zkJePYQ /6vCbwtMhjTfdV8YtOx0FDbDfoJ/8tOHN33w3fsuMp/WYlRYhjPEgegFMRlQIQyFXa6l TJkTvQk9mOH4mKg/CsPbPYqMJz8sNuezILfEdeWc4sG3v4Ax/Kdzq7+qoQ8iLcR2Bap0 eMRQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v13-20020a056808004d00b0033a579861d8si11563109oic.111.2022.07.20.06.20.22; Wed, 20 Jul 2022 06:20:35 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240735AbiGTNMi (ORCPT + 99 others); Wed, 20 Jul 2022 09:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238843AbiGTNMg (ORCPT ); Wed, 20 Jul 2022 09:12:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 672305B056 for ; Wed, 20 Jul 2022 06:12:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 95C3C15A1; Wed, 20 Jul 2022 06:12:27 -0700 (PDT) Received: from bogus (unknown [10.57.12.183]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4BE713F70D; Wed, 20 Jul 2022 06:12:24 -0700 (PDT) Date: Wed, 20 Jul 2022 14:12:21 +0100 From: Sudeep Holla To: Saravana Kannan Cc: Russell King , Philipp Zabel , Sudeep Holla , Rob Herring , Ulf Hansson , Linus Walleij , Nicolas Saenz Julienne , Geert Uytterhoeven , Marek Szyprowski , Kefeng Wang , Greg Kroah-Hartman , kernel-team@android.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5] amba: Remove deferred device addition Message-ID: <20220720131221.azqfidkry3cwiarw@bogus> References: <20220719182010.637337-1-saravanak@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220719182010.637337-1-saravanak@google.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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 Tue, Jul 19, 2022 at 11:20:10AM -0700, Saravana Kannan wrote: > The uevents generated for an amba device need PID and CID information > that's available only when the amba device is powered on, clocked and > out of reset. So, if those resources aren't available, the information > can't be read to generate the uevents. To workaround this requirement, > if the resources weren't available, the device addition was deferred and > retried periodically. > > However, this deferred addition retry isn't based on resources becoming > available. Instead, it's retried every 5 seconds and causes arbitrary > probe delays for amba devices and their consumers. > > Also, maintaining a separate deferred-probe like mechanism is > maintenance headache. > > With this commit, instead of deferring the device addition, we simply > defer the generation of uevents for the device and probing of the device > (because drivers needs PID and CID to match) until the PID and CID > information can be read. This allows us to delete all the amba specific > deferring code and also avoid the arbitrary probing delays. > > Cc: Rob Herring > Cc: Ulf Hansson > Cc: Saravana Kannan > Cc: Linus Walleij > Cc: Sudeep Holla Tested-by: Sudeep Holla on Juno with linux-next(which had the reported issue [1]) + this patch(which fixes the issue) -- Regards, Sudeep [1] https://lore.kernel.org/all/20220701150848.75eeprptmb5beip7@bogus/