public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Stuart Yoder <stuart.yoder@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>,
	Kim Phillips <kim.phillips@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"Bharat.Bhushan@freescale.com" <Bharat.Bhushan@freescale.com>,
	"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"a.motakis@virtualopensystems.com"
	<a.motakis@virtualopensystems.com>,
	"agraf@suse.de" <agraf@suse.de>,
	Varun Sethi <Varun.Sethi@freescale.com>
Subject: Re: [REPOST][PATCH 1/2] driver core: Add new device_driver flag to allow binding via sysfs only
Date: Thu, 19 Dec 2013 16:00:35 -0800	[thread overview]
Message-ID: <20131220000035.GA5462@kroah.com> (raw)
In-Reply-To: <e5b60a9c612c4a30b62d702f84ef400e@DM2PR03MB352.namprd03.prod.outlook.com>

On Thu, Dec 19, 2013 at 11:08:55PM +0000, Stuart Yoder wrote:
> > > How will it "know not to grab the device"?  The knowledge of whether
> > the
> > > binding was explicitly requested or not does not get passed through to
> > > the probe function.
> > 
> > Nor should it, as a driver should not know, nor care about this.
> > 
> > It's up to the BUS to handle this if it really wants to, and I'm afraid
> > that I really am not convinced that the driver core needs to handle it
> > either.
> > 
> > But again, as you don't have anything that could actually use this code
> > that is mergable, it's a totally moot point, sorry.
> 
> Understand, but what assumption do we develop vfio-plaform with?  That
> a driver core 'sysfs_bind_only' flag is not an option, period?  If that
> is the case we need to go back to square one and invent some new mechanism
> to bind devices to the vfio-platform driver.

Ok, why the total confusion between PCI and platform devices here?  Why
keep mentioning both of them in a semi-interchangeable way?

> I guess it would need to be the platform bus equivalent of new_id.

Then add it, there's nothing stopping the platform bus from supporting
this.

> But, then we're left with the potential racy situation where multiple drivers
> can potentially grab a device and it's ambiguous and non-deterministic at to which
> driver binds to it.

Welcome to life in hotpluggable systems, this is nothing new :)

Seriously, userspace has the ability to sort this all out after devices
show up, use it.  Don't try to create convoluted schemes in the driver
core that are confusing and don't really seem to work.

People have asked for a "priority" of drivers binding to devices for
over a decade now, as "other" operating systems have it.  Turns out, no
one has ever needed it badly enough to actually implement it...

good luck,

greg k-h

      reply	other threads:[~2013-12-20  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 12:34 [REPOST][PATCH 1/2] driver core: Add new device_driver flag to allow binding via sysfs only Kim Phillips
2013-12-03 15:34 ` Jan Kiszka
2013-12-05 17:45   ` Kim Phillips
2013-12-05 22:38     ` Scott Wood
2013-12-09 18:58       ` Kim Phillips
2013-12-09 19:12         ` Jan Kiszka
2013-12-09 21:33           ` Scott Wood
2013-12-19  1:04   ` Greg Kroah-Hartman
2013-12-19  1:07 ` Greg Kroah-Hartman
2013-12-19 20:22   ` Scott Wood
2013-12-19 20:34     ` Greg Kroah-Hartman
2013-12-19 21:06       ` Stuart Yoder
2013-12-19 21:43         ` Greg Kroah-Hartman
2013-12-19 22:15           ` Scott Wood
2013-12-19 22:32             ` Greg Kroah-Hartman
2013-12-19 23:08               ` Stuart Yoder
2013-12-20  0:00                 ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131220000035.GA5462@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Bharat.Bhushan@freescale.com \
    --cc=Varun.Sethi@freescale.com \
    --cc=a.motakis@virtualopensystems.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kim.phillips@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scottwood@freescale.com \
    --cc=stuart.yoder@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox