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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30B9DC83000 for ; Tue, 28 Apr 2020 15:51:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5DF0205C9 for ; Tue, 28 Apr 2020 15:51:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BPHSEfpR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5DF0205C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gWdcE8jotpHRxBYIBxe0Rs79yoTWFFuA6M6JB2KEtbs=; b=BPHSEfpRI2QFtT GC+Y5TqNWVW6BuDWis/jNICD+DHjmvaJr23x0VK6L0ZwWSNeCNIYGKTLSX8tOczi+cCLiTfNwsuZO GomfLo6qD/oEmxjWTx/tZYkvOVShKIgbqVd/BtTOYgwAoLalvd8bMHQj6TdCSeaJdIEY247vhouuI 6OwkcJOWvwvBe06tClOQ/tyBdthV9ICC/mcmS+DGNbELrO2DsMOuWPJcB6Fw6xrJa1/736jsypRpJ dNEewP+8nYeJGvbAUHoRIaea6VjArojzwcyxEHVN4VYrNmzic2YWmflF+TZ8jenuZQ3zjRjcmYjop 5lssF08mJirCL38PvY7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTSWS-0008Vx-D8; Tue, 28 Apr 2020 15:51:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTSWO-0008U7-Bb for linux-arm-kernel@lists.infradead.org; Tue, 28 Apr 2020 15:51:46 +0000 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 CC5D930E; Tue, 28 Apr 2020 08:51:40 -0700 (PDT) Received: from bogus (unknown [10.37.12.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2C39E3F305; Tue, 28 Apr 2020 08:51:39 -0700 (PDT) Date: Tue, 28 Apr 2020 16:51:32 +0100 From: Sudeep Holla To: Rob Herring Subject: Re: [PATCH] amba: Retry adding deferred devices at late_initcall Message-ID: <20200428155132.GA11891@bogus> References: <20200427212514.11219-1-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200427212514.11219-1-robh@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200428_085144_444056_DF38410F X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Saravana Kannan , Geert Uytterhoeven , Linus Walleij , Russell King , John Stultz , linux-arm-kernel@lists.infradead.org, Sudeep Holla , Nicolas Saenz Julienne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Apr 27, 2020 at 04:25:14PM -0500, Rob Herring wrote: > If amba bus devices defer when adding, the amba bus code simply retries > adding the devices every 5 seconds. This doesn't work well as it > completely unsynchronized with starting the init process which can > happen in less than 5 secs. Add a retry during late_initcall. If the > amba devices are added, then deferred probe takes over. If the > dependencies have not probed at this point, then there's no improvement > over previous behavior. To completely solve this, we'd need to retry > after every successful probe as deferred probe does. > > The list_empty() check now happens outside the mutex, but the mutex > wasn't necessary in the first place. > > This needed to use deferred probe instead of fragile initcall ordering > on 32-bit VExpress systems where the apb_pclk has a number of probe > dependencies (vexpress-sysregs, vexpress-config). > > Cc: John Stultz > Cc: Saravana Kannan > Cc: Linus Walleij > Cc: Sudeep Holla The change makes sense to me, Reviewed-by: Sudeep Holla This also fixed the issue I reported @[1] is fixed with this patch, so: Tested-by: Sudeep Holla -- Regards, Sudeep [1] https://lore.kernel.org/linux-arm-kernel/20200423133342.GA10628@bogus/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel