From: Scott Wood <scottwood@freescale.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Stuart Yoder <stuart.yoder@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:15:03 -0600 [thread overview]
Message-ID: <1387491303.3140.156.camel@snotra.buserror.net> (raw)
In-Reply-To: <20131219214336.GA24629@kroah.com>
On Thu, 2013-12-19 at 13:43 -0800, Greg Kroah-Hartman wrote:
> On Thu, Dec 19, 2013 at 09:06:21PM +0000, Stuart Yoder wrote:
> >
> >
> > > -----Original Message-----
> > > From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
> > > Sent: Thursday, December 19, 2013 2:34 PM
> > > To: Wood Scott-B07421
> > > Cc: Kim Phillips; linux-kernel@vger.kernel.org; kvm@vger.kernel.org;
> > > Bhushan Bharat-R65777; Yoder Stuart-B08248; christoffer.dall@linaro.org;
> > > alex.williamson@redhat.com; a.motakis@virtualopensystems.com;
> > > agraf@suse.de; Sethi Varun-B16395
> > > Subject: Re: [REPOST][PATCH 1/2] driver core: Add new device_driver flag
> > > to allow binding via sysfs only
> > >
> > > No. But you can use bind/unbind along with the existing new_id file to
> > > get what you want today.
> >
> > Yes, but that only works for PCI.
>
> No, not only PCI.
>
> > There is no such concept for platform drivers.
>
> Then fix that.
We've already explained why that would be bad.
> Or make your device not be a platform device, odds are that's the better
> solution in the end, right?
How would that solve anything? We'd just be talking about there not
being such a mechanism for the device tree "bus" instead.
> > > If you just happen to bind a device to a wrong
> > > driver for a while, that's not really a problem, right?
> >
> > It's annoying but not the end of the world.
Lots of bugs are "not the end of the world" but that doesn't mean we
don't fix them. It certainly doesn't mean we duplicate the source of
the bug in new subsystems.
> > > I don't like this patch as we are adding lots of special and odd logic
> > > to the core, for use by almost no one, which ensures that it will never
> > > get tested, and will probably get broken in some subtle way in the
> > > future.
> >
> > It certainly will be used by users of vfio-platform.
> >
> > Here is the problem-- the new platform device "match_any_dev" mechanism
> > in patch 2 of this series is not going to work without "sysfs_bind_only".
> > A platform driver that just sets "match_any_dev" will grab any or all
> > platform devices during normal bus probing.
>
> No it will not, it will fail in the probe function as it knows to not
> grab the device, just like any driver for other busses that say it can
> "handle all Intel PCI devices" and the like.
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.
It would be a shame to have to implement code in VFIO, and a userspace
interface to go along with it, to keep track of which devices have been
authorized to be bound when we already have sysfs bind -- we just need a
way to differentiate that from automatic binding.
-Scott
next prev parent reply other threads:[~2013-12-19 22:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 12:34 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 [this message]
2013-12-19 22:32 ` Greg Kroah-Hartman
2013-12-19 23:08 ` Stuart Yoder
2013-12-20 0:00 ` Greg Kroah-Hartman
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=1387491303.3140.156.camel@snotra.buserror.net \
--to=scottwood@freescale.com \
--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=gregkh@linuxfoundation.org \
--cc=kim.phillips@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®