Received: by 10.213.65.68 with SMTP id h4csp269859imn; Wed, 21 Mar 2018 18:28:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELtNJa3iUGMwUAv45TgAQZDAY9p8Ry8ipvmjF8DKa4hkZnFsWgIb+kjcH1J+OAJdjvcbcffm X-Received: by 10.99.36.193 with SMTP id k184mr16398171pgk.80.1521682111878; Wed, 21 Mar 2018 18:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521682111; cv=none; d=google.com; s=arc-20160816; b=LZD+ngNUTLPt6icuE95DyLfs7J6Y0wuEW2qwMe0Fz9SdvkFAm9ATEkCCoYlxE3dT2P LsFbBqu01YSjBlYSsxN//2HuxtwNmEa8qCBqMdRFtCKGmFkJyRwadvzE2i1Gwa/Dzyd6 U8JiCwl5XXBc0fPGjcZvSPMVUWRqpDNLxiwhxckBJQIoP/pIkOXe1iKiR+MAmHp/9Fxg Ej/dh1HSicAkRGDCe31D4JUV5IctmcpgApFHxzMRpUsJztJjRaeocMJ5lOsZfk6Zq2pT uPg/M7HhEXGH6oxcDHL+CESd/37vukumtMNUDqODso8VRMios3YAh2gP/2vvlusL+6PI l0WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=uZ4Mi98PeR4VmiQYIyhq9BrGYB0C+fSjSEgg0TI26y0=; b=lv4pVahDpYX8dbO0mCeDU+scEeJi2+JzWR9FauGe/oTeD6Cc23llpKVYJsNV1SmOe6 vGr9Qb5OUpVMXQECicFabk/Sac7Wxyoh/o6AiCzCfAU9nm8LHo6IpCSh+ScaIaSU27bj 1MQoJBMXgtoz1WLFr/YB2cRkMGpNBkiBJ5f1U/2Xw/TUFURdSN6qB8uhK+S59cXEreqe llN22VE0NHgDVF0ce5Hlp5nDzsMloVEVIzBHqSvTcuU/tIqBa5UUSAc2LgSj/qjXezUZ 0O2s2uA5eQ5boNu7UmDM1HU0vik1O1WlQU52VZDkvgg2uhw4eV2/V7zNk9aVfg6UkGBB koZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kMfCxKc0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si3571089pgp.369.2018.03.21.18.28.17; Wed, 21 Mar 2018 18:28:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kMfCxKc0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752935AbeCVB0M (ORCPT + 99 others); Wed, 21 Mar 2018 21:26:12 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:41472 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752232AbeCVB0K (ORCPT ); Wed, 21 Mar 2018 21:26:10 -0400 Received: by mail-pf0-f182.google.com with SMTP id f80so2721249pfa.8 for ; Wed, 21 Mar 2018 18:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uZ4Mi98PeR4VmiQYIyhq9BrGYB0C+fSjSEgg0TI26y0=; b=kMfCxKc0/TVZc3YDiziVjb6Af4QhOaPIVhFq092iBruI0+mKgAqRggLnv0bnUttLG0 gn4EvfuVyeEBeZXccPs2+SrqzSBj6UvG80f5d0PY4klJXz261qeJfqbUS+9j8lmNB1XT wyMOMxUCQ8PCr/LJFrC1DH1WSciWcXHjA5euk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uZ4Mi98PeR4VmiQYIyhq9BrGYB0C+fSjSEgg0TI26y0=; b=GxAsScmKopzMw4uwvDcAFKo9tB9QdXZ8u4ZItXmVaY6ewefvW97Cx1XLU07lCUmJ6P aZddMFbr0dgZ18lvRP5WpdDa1vFbRVMAz/5AbKnwdjLQMlskSsr9xHDepHAlNFPHKLUk oDBYvMYYYLsWEu0eFN+VH/EW1iIph/zvQah9+v0QPoih9YyACTiUdGash6D22ppekeXr XHpyy3ZQrmzq9YfPsKrthrvcBigi+QMjdLby0lvj2EBtz0HwYzirhRHyvhWnhfQUGnuo udG7QfN8nN9EcPCVw5L1iwVi9ufwNkknpvQIoshtTx6k+6mYzUq+VwDA9He/mBiVvONc gp1w== X-Gm-Message-State: AElRT7FOzLiLXiBdWboqebd5hKPrnSqnLDfDHQQvGmiy5t0bzYhqcNhh q0UApVG114YVzNFI588quSFKqg== X-Received: by 10.98.18.143 with SMTP id 15mr18921370pfs.104.1521681969801; Wed, 21 Mar 2018 18:26:09 -0700 (PDT) Received: from localhost ([218.255.99.6]) by smtp.gmail.com with ESMTPSA id o28sm10562055pfa.62.2018.03.21.18.26.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Mar 2018 18:26:08 -0700 (PDT) Date: Thu, 22 Mar 2018 09:26:06 +0800 From: Viresh Kumar To: Greg Kroah-Hartman Cc: Vincent Guittot , Stephen Boyd , Rajendra Nayak , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robdclark@gmail.com, s.hauer@pengutronix.de, l.stach@pengutronix.de, shawnguo@kernel.org, fabio.estevam@nxp.com, nm@ti.com, xuwei5@hisilicon.com, robh+dt@kernel.org, olof@lixom.net, georgi.djakov@linaro.org Subject: Re: [PATCH V7 00/13] drivers: Boot Constraint core Message-ID: <20180322012606.vuaemu3pvpeojtwr@vireshk-mac-ubuntu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23-02-18, 15:53, Viresh Kumar wrote: > Problem statement: > > Some devices are powered ON by the bootloader before the bootloader > handovers control to Linux. It maybe important for some of those devices > to keep working until the time a Linux device driver probes the device > and reconfigure its resources. > > A typical example of that can be the LCD controller, which is used by > the bootloaders to show image(s) while the platform is booting into > Linux. The LCD controller can be using some resources, like clk, > regulators, etc, that are shared between several devices. These shared > resources should be configured to satisfy need of all the users. If > another device's (X) driver gets probed before the LCD controller driver > in this case, then it may end up disabling or reconfiguring these > resources to ranges satisfying the current users (only device X) and > that can make the LCD screen unstable. > > Another case can be a debug serial port enabled from the bootloader. > > Of course we can have more complex cases where the same resource is > getting used by two devices while the kernel boots and the order in > which devices get probed wouldn't matter as the other device will surely > break then. And we have a _real_ use case for this complex scenario as well. Georgi (cc'd) is currently working[1] on implementing generic support for the interconnect bus, which tries to play with the bandwidth of the bus based on how much are the requirements from different parts of the SoC. The 4th version was posted recently by him, and things are looking good/positive. The bootloader configures the interconnect to provide sufficient bandwidth for all the devices which are used during boot, few of them are the CPUs, serial and the LCD controller. As the kernel starts taking control of things, the drivers being probed start putting their requirements on the interconnect bus. Because the interconnect doesn't have any representation from the devices which are not yet initialized by the kernel, the interconnect core incorrectly reduces the bandwidth of the bus to a level unacceptable to the devices running currently, like the CPUs and this makes kernel boot awfully slow. This is not an ordering problem as no matter which device we probe first, we are going to break something else. Georgi already tried using the boot constraint patches to solve this complex problem, and its a perfect fit. -- viresh [1] http://lkml.kernel.org/r/20180309210958.16672-1-georgi.djakov@linaro.org