From: Brice Goglin <brice@myri.com>
To: Greg KH <greg@kroah.com>
Cc: Matt Porter <mporter@embeddedalley.com>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC] Simple userspace interface for PCI drivers
Date: Thu, 31 Aug 2006 21:36:08 -0400 [thread overview]
Message-ID: <44F78E88.8050602@myri.com> (raw)
In-Reply-To: <20060830175529.GB6258@kroah.com>
Greg KH wrote:
> On Wed, Aug 30, 2006 at 09:34:10AM -0500, Matt Porter wrote:
>
>> On Tue, Aug 29, 2006 at 11:23:38PM -0700, Greg KH wrote:
>>
>>> A while ago, Thomas and I were sitting in the back of a conference
>>> presentation where the presenter was trying to describe what they did in
>>> order to add the ability to write a userspace PCI driver. As was usual
>>> in a presentation like this, the presenter totaly ignored the real-world
>>> needs for such a framework, and only got it up and working on a single
>>> type of embedded system. But the charts and graphs were quite pretty :)
>>>
>>> Thomas and I lamented that we were getting tired of seeing stuff like
>>> this, and it was about time that we added the proper code to the kernel
>>> to provide everything that would be needed in order to write PCI drivers
>>> in userspace in a sane manner. Really all that is needed is a way to
>>> handle the interrupt, everything else can already be done in userspace
>>> (look at X for an example of this...)
>>>
>> What about portable access to the PCI DMA API from userspace?
>>
>
> It currently does not provide this, but if you know how your card works,
> I'm pretty sure you can get this working without such an interface.
>
> If you wish to add this functionality, to make it easier, that would be
> great.
>
I might be nice to have something like a copy-block where the
application writes/reads data, while the device does DMA only from/to
there. We would need an easy way to mmap some anonymous DMA-ready memory
in user-space, and something to give the corresponding DMA addresses to
the application.
Additionally, the current code might not be flexible enough regarding
acknowledging of interrupts. It might be good to use the bit that PCI
2.2 defines in the config space to mask/unmask interrupt in a generic
way. Something like : when an interrupt comes, the driver mask the
interrupts using this bit, and then passes the event to user-space. The
user-space interrupt handler acknowledges the interrupt with the device
specific code, and then unmask with the PCI 2.2 bit.
Brice
next prev parent reply other threads:[~2006-09-01 1:36 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-30 6:23 [RFC] Simple userspace interface for PCI drivers Greg KH
2006-08-30 10:09 ` Thomas Gleixner
2006-08-30 14:34 ` Matt Porter
2006-08-30 16:25 ` Thomas Gleixner
2006-08-30 17:55 ` Greg KH
2006-08-30 20:32 ` Foli Ayivoh
2006-08-30 21:01 ` Matthias Schniedermeyer
2006-08-30 21:25 ` linux-os (Dick Johnson)
2006-08-30 22:08 ` Greg KH
2006-09-01 1:36 ` Brice Goglin [this message]
2006-09-01 3:22 ` Greg KH
2006-09-01 3:37 ` Brice Goglin
2006-09-01 4:27 ` Greg KH
2006-08-31 13:49 ` Andi Kleen
2006-09-01 18:16 ` Greg KH
2006-08-30 17:07 ` Manu Abraham
2006-08-30 17:52 ` Greg KH
2006-08-30 22:50 ` Manu Abraham
2006-08-31 0:17 ` Greg KH
2006-08-31 13:24 ` Manu Abraham
2006-08-31 22:42 ` Greg KH
2006-08-31 7:40 ` Andrew Morton
2006-08-31 8:05 ` Thomas Gleixner
2006-08-31 8:30 ` Xavier Bestel
2006-08-31 20:39 ` Lee Revell
2006-08-31 20:53 ` Chris Friesen
2006-08-31 21:39 ` Greg KH
2006-08-31 20:58 ` Xavier Bestel
2006-08-31 21:12 ` Lee Revell
2006-08-31 21:18 ` Xavier Bestel
2006-08-31 21:33 ` Manu Abraham
2006-08-31 21:40 ` Greg KH
2006-09-01 21:17 ` Pavel Machek
2006-09-03 8:34 ` Thomas Gleixner
2006-09-12 19:47 ` Sam Ravnborg
2006-09-14 5:57 ` Greg KH
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=44F78E88.8050602@myri.com \
--to=brice@myri.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mporter@embeddedalley.com \
--cc=tglx@linutronix.de \
/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