Received: by 10.192.165.148 with SMTP id m20csp624870imm; Wed, 2 May 2018 06:17:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzxnK7yDOTCHbsyC4pdM3i8OOBsIb7S8uazAmbD8pAFnyG/h9Zcs63LPst+n0a7JvgZ/4Y X-Received: by 10.98.17.82 with SMTP id z79mr19194720pfi.135.1525267023032; Wed, 02 May 2018 06:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525267022; cv=none; d=google.com; s=arc-20160816; b=XVqM/FeVBJt1C2sQ0onYyqJBJdH0VZGIcS51JGVt304f4pqtsSekjcRN7bfU2QDgEY Wcm8i8eswfnKakNUQP/URIeGt6a6vJudAhUa0AtqP/DbeQId7l+ermX8QPv9EI5oM6n3 83e6Omit0hVVs/3gB0j3mXDsDnLzKp7dh3Qee/c0Dpszti6LmfYsGERYPd7jZbGDKB/f zOCrYc/6opXkW8SMI9OO5vgLMykjXnrAb+EBHJU17eZ3lX2K7SmYqBqPihpwDhSdXWNg OTIMcnVSil42CLaa8Q9EhMD6ghJslVOj8pGMLfq02c+FdGfzV2TcyMCIvbUiXAqn+v/0 6zJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=4Ko+V7IlSu5tZEkwd6zwNfliw7mqIVuxiV2PWqgDWXo=; b=W9qqX04coweldW4ynBJTTJX+WmADpRJEonnOwNEs28k9+SPYzzsqAlnOiBlBHthpuW ecvJwMRm/eb+dLX+IdNGdsFzs8fUdN/x7D8X0Ik95XwO32CfMt1H6L7oQJ0sdByn1eRZ PVhDzsOCSipK07glJXuYRuXOSv9w8kKPo0b4/FN258C4FxwSX+EUx4JNq9y0xwA1eHzv LbJsgyuOWZyGDlShrvFFry209nZLK1JqRjQFtew7alBCIZIp+R1nrnwYhFVhNd8uMiJk eheUZNtBS/3hknnVaYBaBeX9MuH5WjjYBDYBZDv95+dz8geO6CQOyUyruHOTSS03TFtP Qgfw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8-v6si11818802pli.474.2018.05.02.06.16.48; Wed, 02 May 2018 06:17:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbeEBNQU (ORCPT + 99 others); Wed, 2 May 2018 09:16:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:52602 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020AbeEBNQS (ORCPT ); Wed, 2 May 2018 09:16:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6595FABE9; Wed, 2 May 2018 13:16:17 +0000 (UTC) Subject: Re: [RFC PATCH] driver core: make deferring probe forever optional To: Rob Herring , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Greg Kroah-Hartman , Grant Likely , Linus Walleij , Mark Brown , Stephen Boyd , boot-architecture@lists.linaro.org, linux-arm-kernel@lists.infradead.org References: <20180501213114.20183-1-robh@kernel.org> From: Alexander Graf Message-ID: Date: Wed, 2 May 2018 15:16:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180501213114.20183-1-robh@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/01/2018 11:31 PM, Rob Herring wrote: > Deferred probe will currently wait forever on dependent devices to probe, > but sometimes a driver will never exist. It's also not always critical for > a driver to exist. Platforms can rely on default configuration from the > bootloader or reset defaults for things such as pinctrl and power domains. > This is often the case with initial platform support until various drivers > get enabled. There's at least 2 scenarios where deferred probe can render > a platform broken. Both involve using a DT which has more devices and > dependencies than the kernel supports. The 1st case is a driver may be > disabled in the kernel config. The 2nd case is the kernel version may > simply not have the dependent driver. This can happen if using a newer DT > (provided by firmware perhaps) with a stable kernel version. > > Unfortunately, this change breaks with modules as we have no way of > knowing when modules are done loading. One possibility is to make this > opt in or out based on compatible strings rather than at a subsystem level. > Ideally this information could be extracted automatically somehow. OTOH, > maybe the lists are pretty small. There's only a handful of subsystems > that can be optional, and then only so many drivers in those that can be > modules (at least for pinctrl, many drivers are built-in only). > > Cc: Alexander Graf > Signed-off-by: Rob Herring > --- > This patch came out of a discussion on the ARM boot-architecture > list[1] about DT forwards and backwards compatibility issues. There are > issues with newer DTs breaking on older, stable kernels. Some of these > are difficult to solve, but cases of optional devices not having > kernel support should be solvable. I think this is a reasonable approach. Maybe this should be a CONFIG option that disallows pinctrl drivers (and power domain later) to be =m? Then by default we could force those drivers to be compiled in, but if you really wanted to do kernel modules for pinctrl/pd you'd consciously potentially lose forward compatibility. Alex