Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3376410imm; Fri, 25 May 2018 04:48:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoCHa6MjdDwE+qcu0c/tgUT6e6iahpmFkzyBXbUuHSJIvf03hkdNqrN/P/04QAMpPztb45f X-Received: by 2002:a63:788b:: with SMTP id t133-v6mr1766253pgc.20.1527248916439; Fri, 25 May 2018 04:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527248916; cv=none; d=google.com; s=arc-20160816; b=QoRkJQxaJnGR+MJCZpXyT3Ci+79LPqENpRHIuNS2YIG3hGhDRXVg010lEMJSzwCOmd XmrlfoQOlV8VIZ84dqYZslboNyTFyZzrK7B3By0mbNAHvn5WJhwTnrmaSpNxSaXMv5/L RYH6hPnzXTE5Jia2lajtFGne1zJkuE+q5eZ152ltpqf42HgofhYPpWyv2tadyKc7eTtr PKrY1QurVG34RWQWJu4KgLCPi6QKqJNcWx2lbQi+/t+/55flLnCMAkKXCO2q81NTawb0 kLFj5YiosSAXYRh4eg0ZyaoYlMo+trydYZLza07pSBROt6enhppy4ZlCMHFzWnps+Yae QPVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=43h4XKuPlcPp7m/fxxdP1/dkNEsXrMoV2XIODw5DaMk=; b=IkvIbxJ3nraL1rWqGeJfYvriPakTb17onmtW3/0FTR0tfzkpeBDzfsMjkXIhxKz0ks +AJiQzgp7ujwm2yw8vJ/nCUuMRQsANruAk4IwNqDux8XWoILvEIZ9lcS85MCQl4FTzQd cgpuBql4cjxsk9OUiQPT7FdLUkdrJ6nQN3duuTL6fJFvvz7pj43VRkYU7D+HUpRKrc8J wQY6MfR43tgKtCXboqfmnQmW8ZC/yev8kYCtXGYab4M45xIGyz2EuHqqYJ7S4zcvhbEB 2yx+W+g3r/+He9uPGiPijR7RcEhWpLASUJJASDh7KjiiS+92ptpjwKD215bJ9dNBQvkM w0jw== 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 l21-v6si2464698pgo.93.2018.05.25.04.48.21; Fri, 25 May 2018 04:48:36 -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 S966703AbeEYLrw (ORCPT + 99 others); Fri, 25 May 2018 07:47:52 -0400 Received: from foss.arm.com ([217.140.101.70]:60572 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966235AbeEYLru (ORCPT ); Fri, 25 May 2018 07:47:50 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5E0301529; Fri, 25 May 2018 04:47:50 -0700 (PDT) Received: from [10.1.210.88] (e110467-lin.cambridge.arm.com [10.1.210.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DED983F24A; Fri, 25 May 2018 04:47:47 -0700 (PDT) Subject: Re: [PATCH v2 1/8] driver core: make deferring probe after init optional To: Mark Brown , Rob Herring Cc: Greg Kroah-Hartman , Linus Walleij , Alexander Graf , Bjorn Andersson , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Joerg Roedel , Frank Rowand , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, boot-architecture@lists.linaro.org, linux-arm-kernel@lists.infradead.org References: <20180524175024.19874-1-robh@kernel.org> <20180524175024.19874-2-robh@kernel.org> <20180524181834.GF4828@sirena.org.uk> From: Robin Murphy Message-ID: <5c0831eb-dcdc-af27-fc4f-5c5018297287@arm.com> Date: Fri, 25 May 2018 12:47:46 +0100 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: <20180524181834.GF4828@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/05/18 19:18, Mark Brown wrote: > On Thu, May 24, 2018 at 12:50:17PM -0500, Rob Herring wrote: > >> Subsystems or drivers may opt-in to this behavior by calling >> driver_deferred_probe_check_init_done() instead of just returning >> -EPROBE_DEFER. They may use additional information from DT or kernel's >> config to decide whether to continue to defer probe or not. > > Should userspace have some involvement in this decision? It knows if > it's got any intention of loading modules for example. Kernel config > checks might be good enough, though it's going to be a pain to work out > if the relevant driver is built as a module for example. Arguably userspace has some control over that already, as in many cases it can just unbind and reprobe the consumer driver after loading the provider driver (in my silly IOMMU-drivers-as-modules PoC a while ago I was delighted to find that it can really be that simple). It's a bit harder when the device is the primary console or root filesystem, but I think that's effectively just another variant of the "defer until a module is loaded" chicken-and-egg problem. Robin.