Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp172109pxb; Tue, 17 Aug 2021 22:47:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU+8REwUschAWc5bAXWQ6G7ECCzvBaxCYESZM4tGFnqXQMe6wHos2Oq/y8IHE8fVL1InUt X-Received: by 2002:a05:6e02:d06:: with SMTP id g6mr5064014ilj.153.1629265655926; Tue, 17 Aug 2021 22:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629265655; cv=none; d=google.com; s=arc-20160816; b=njREopvZMwenBk8xWR4UQGzLJg9Jp+uQket2A8Au0F6b2cqo3n0+mYU/OIyVEDC9vQ /QvEV3FKvDwgfZs705rfBapnX3duRTPMMlNpgPnKsbvVmKCLpOam4NigPXXE52BeEfip Vscn0P9f9UMZF0R/YOfbar3GUV4alGfgHPdOC4RRVh8aGzM62sIkAyD4RvGVbmwGkAFr 8N1IQawwSHK0/5Hna/reto1GdIDjbWn4/zjeYYhDCB+rOEbq/3kXrKGdOJf7u28NIAKv aCwFRACS9CUGYzKg16nFmgroS1VoggQPakE2Rf00xODfBIfJX98NnMgFof2mLMGkCXN5 zRWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JzE1PP077N8PpFvxlwK3LCrqR58JFfCGM4tHZSh/7QA=; b=co3rPnhLSKd383CzrbVMg7+ZvWLFQeu6v1Xr3PYHpTSUYd5xvkE1xKFok6Mmr9gq+P DuhMeyvU2hendTLEFYadJbKxTE/pn49HBvhIXIwsv3WYb2s3qDr9gFQGgASPeU7PlRjI BgHiTmozbpuWG1CZiff16RVihgYDVBES1dF4hiheGrjJ4A3lUYlLy55rOVxG+2cnoLx1 qJSHEvTRBVu/iup9eUuvIkfepvaN6lR4tyoegg0ARQ8O3KuXFxi5Jqogex7FlJS0BvWA ZqYm4euR8LhFCqDolPM75i897Va0fSRrsvy8FBxqSJAc4cbEI3Kldsx4ZL/egxJfsRRC lGfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="DIt3/ctK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si4096446ilq.38.2021.08.17.22.47.24; Tue, 17 Aug 2021 22:47:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="DIt3/ctK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237872AbhHRFpR (ORCPT + 99 others); Wed, 18 Aug 2021 01:45:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:36310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237588AbhHRFpR (ORCPT ); Wed, 18 Aug 2021 01:45:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E282C61029; Wed, 18 Aug 2021 05:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1629265483; bh=7446DzpnOmXY4YsWJJYk17WCKdb6uzLqiGzSw2ucE7Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DIt3/ctKDnKk1yHUF5CEjOyKodI6tV6uqCyZgbnHxUXsQV9sSGF69aNnJSta7tdP0 KEcg/j6ezycsgOnXBQhFi9+L33P0xEBC7odObRiNyUNsrjYNgizGq9/AqUo0BqYqeZ mO/IaPxHCz0Kdm5Vlphzj8C2/BwLu0Pq26qpTw1c= Date: Wed, 18 Aug 2021 07:44:39 +0200 From: Greg Kroah-Hartman To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, liam.r.girdwood@linux.intel.com, Andy Shevchenko , Dan Williams , Jason Gunthorpe , Christoph Hellwig , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: Re: [RFC PATCH 1/2] driver core: export driver_deferred_probe_trigger() Message-ID: References: <20210817190057.255264-1-pierre-louis.bossart@linux.intel.com> <20210817190057.255264-2-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210817190057.255264-2-pierre-louis.bossart@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 02:00:56PM -0500, Pierre-Louis Bossart wrote: > The premise of the deferred probe implementation is that a successful > driver binding is a proxy for the resources provided by this driver > becoming available. While this is a correct assumption in most of the > cases, there are exceptions to the rule such as > > a) the use of request_firmware_nowait(). In this case, the resources > may become available when the 'cont' callback completes, for example > when if the firmware needs to be downloaded and executed on a SoC > core or DSP. > > b) a split implementation of the probe with a workqueue when one or > ore request_module() calls are required: a synchronous probe prevents > other drivers from probing, impacting boot time, and an async probe is > not allowed to avoid a deadlock. This is the case on all Intel audio > platforms, with request_module() being required for the i915 display > audio and HDaudio external codecs. > > In these cases, there is no way to notify the deferred probe > infrastructure of the enablement of resources after the driver > binding. Then just wait for it to happen naturally? > The driver_deferred_probe_trigger() function is currently used > 'anytime a driver is successfully bound to a device', this patch > suggest exporing by exporting it so that drivers can kick-off > re-probing of deferred devices at the end of a deferred processing. I really do not want to export this as it will get really messy very quickly with different drivers/busses attempting to call this. Either handle it in your driver (why do you have to defer probe at all, just succeed and move on to register the needed stuff after you are initialized) or rely on the driver core here. thanks, greg k-h