Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753052AbdF0SDv (ORCPT ); Tue, 27 Jun 2017 14:03:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:60806 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751716AbdF0SDq (ORCPT ); Tue, 27 Jun 2017 14:03:46 -0400 Date: Tue, 27 Jun 2017 20:03:41 +0200 From: "Luis R. Rodriguez" To: Bjorn Andersson Cc: Jakub Kicinski , "Luis R. Rodriguez" , Ming Lei , yi1.li@linux.intel.com, "AKASHI, Takahiro" , nbroeking@me.com, Greg Kroah-Hartman , mfuzzey@parkeon.com, ebiederm@xmission.com, Dmitry Torokhov , Daniel Wagner , David Woodhouse , jewalt@lgsinnovations.com, rafal@milecki.pl, Arend van Spriel , "Rafael J. Wysocki" , atull@kernel.org, Moritz Fischer , pmladek@suse.com, Johannes Berg , emmanuel.grumbach@intel.com, Luca Coelho , luto@kernel.org, Linus Torvalds , Kees Cook , David Howells , pjones@redhat.com, Hans de Goede , alan@linux.intel.com, "Theodore Ts'o" , paul.gortmaker@windriver.com, mtosatti@redhat.com, mawilcox@microsoft.com, Stephen Boyd , Vikram Mulukutla , lkml , oss-drivers@netronome.com Subject: Re: [PATCH] firmware: wake all waiters Message-ID: <20170627180341.GT21846@wotan.suse.de> References: <20170623233702.20564-1-jakub.kicinski@netronome.com> <20170626212036.GE21846@wotan.suse.de> <20170626191009.0c11eed0@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1756 Lines: 37 On Tue, Jun 27, 2017 at 10:48:25AM -0700, Bjorn Andersson wrote: > On Mon, Jun 26, 2017 at 7:10 PM, Jakub Kicinski > wrote: > > On Mon, 26 Jun 2017 23:20:36 +0200, Luis R. Rodriguez wrote: > [..] > > - how to stay bound and retry the direct default FW load until rootfs > > is mounted (equivalent to when -EPROBE_DEFER would give up); > > If you constrain this problem to only await the mounting of a root > file system you miss the various cases where rootfs is later pivoted I do believe the firmwared case can work with pivot root, I can't see why not. In fact it was a case considered from what I can tell > or the firmware isn't stored in the root file system (e.g. every > Android device out there). This was also considered as part of the design. I had particular mentioned to Tom and Daniel the case of an NVRAM sitting somewhere custom and this needed to be tossed laster somehow thorugh some custom mechanism. Let's consider a crazy case where the uevent gets triggered, and userspace goes and signals Elon Musk somehow to transmit the needed firmware from Mars through a serial satellite link to earth, and somehow someday the device is finally ready to upload firmware from userspace. Once Elon's firmware lands home, we know all needed firmware has arrived so anything missing we can acknowledge now as missing, so we upload what we can and kick firmward into final-mode to tell the kernel we know we're really ready and any pending things will have to be given up. This would prove the custom fallback crap was also never needed. I think perhaps one enhancement consideration here may be having the option for best-effort mode and final-mode be per file, but that's all daemon specific code. Luis