From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753729AbdJaQUx (ORCPT ); Tue, 31 Oct 2017 12:20:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:44004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbdJaQUw (ORCPT ); Tue, 31 Oct 2017 12:20:52 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 841C321949 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org X-Google-Smtp-Source: ABhQp+R7MUWhQRhj29lUhcHBscYuVY28vZ4QnhoAGEsvSYRwT9sCIlTqI3Cl6BNpMK9xVrjIH3hpeZ+9GRgUM6Wmyus= MIME-Version: 1.0 In-Reply-To: <88c7a0a6421d267c118f501ea1e920b04649002d.1509284255.git.viresh.kumar@linaro.org> References: <88c7a0a6421d267c118f501ea1e920b04649002d.1509284255.git.viresh.kumar@linaro.org> From: Rob Herring Date: Tue, 31 Oct 2017 11:20:30 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V4 08/12] boot_constraint: Manage deferrable constraints To: Viresh Kumar Cc: Greg Kroah-Hartman , Vincent Guittot , Stephen Boyd , Rajendra Nayak , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Rob Clark , Sascha Hauer , Lucas Stach , Shawn Guo , Fabio Estevam , Nishanth Menon , Wei Xu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 29, 2017 at 8:48 AM, Viresh Kumar wrote: > It is possible that some of the resources aren't available at the time > constraints are getting set and the boot constraints core will return > -EPROBE_DEFER for them. In order to retry adding the constraints at a > later point of time (after the resource is added and before any of its > users come up), this patch proposes two things: > > - Each constraint is represented by a virtual platform device, so that > it is re-probed again until the time all the dependencies aren't met. > The platform device is removed along with the constraint, with help of > the free_resources() callback. > > - Enable early defer probing support by calling > driver_enable_deferred_probe(), so that the core retries probing > deferred devices every time any device is bound to a driver. This > makes sure that the constraint is set before any of the users of the > resources come up. What is the effect on boot time? It's highly platform dependent, but the worst case could be pretty bad I think. I don't see how this handles the case you mentioned where the amba pclk gets disabled. It only works if the constraint device is added before any others, but that is done with initcall level games. Rob