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 7C482C43334 for ; Wed, 20 Jul 2022 13:12:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239980AbiGTNMj (ORCPT ); Wed, 20 Jul 2022 09:12:39 -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> 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/