Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443840 > unrolled thread
| Started by | Rich Felker <dalias@libc.org> |
|---|---|
| First post | 2016-07-15 03:00 +0200 |
| Last post | 2016-07-15 13:50 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH RFC] uio: allow use on nommu systems Rich Felker <dalias@libc.org> - 2016-07-15 03:00 +0200
Re: [PATCH RFC] uio: allow use on nommu systems Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-15 03:50 +0200
Re: [PATCH RFC] uio: allow use on nommu systems Rich Felker <dalias@libc.org> - 2016-07-15 04:00 +0200
Re: [PATCH RFC] uio: allow use on nommu systems Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-15 13:50 +0200
| From | Rich Felker <dalias@libc.org> |
|---|---|
| Date | 2016-07-15 03:00 +0200 |
| Subject | [PATCH RFC] uio: allow use on nommu systems |
| Message-ID | <rUZDX-8qp-1@gated-at.bofh.it> |
mmap of uio devices does not seem to work without further nommu-specific support, but interrupt handling already works, and userspace drivers for nommu systems can simply use physical mmio addresses from userspace directly anyway without mmap. Signed-off-by: Rich Felker <dalias@libc.org> --- I don't particularly expect this to be accepted upstream as-is, but since we're actually trying to use the UIO subsystem on nommu (J2), I'd like to start a discussion of what an acceptable patch would entail. The uio_pdrv_genirq driver was tested on J2 with this patch and interrupt handling works as expected. drivers/uio/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig index 52c98ce..387b2bb 100644 --- a/drivers/uio/Kconfig +++ b/drivers/uio/Kconfig @@ -1,6 +1,5 @@ menuconfig UIO tristate "Userspace I/O drivers" - depends on MMU help Enable this to allow the userspace driver core code to be built. This code allows userspace programs easy access to -- 2.8.1
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-07-15 03:50 +0200 |
| Message-ID | <rV0ql-uG-1@gated-at.bofh.it> |
| In reply to | #1443840 |
On Thu, Jul 14, 2016 at 08:53:06PM -0400, Rich Felker wrote: > mmap of uio devices does not seem to work without further > nommu-specific support, but interrupt handling already works, and > userspace drivers for nommu systems can simply use physical mmio > addresses from userspace directly anyway without mmap. > > Signed-off-by: Rich Felker <dalias@libc.org> > --- > > I don't particularly expect this to be accepted upstream as-is, but > since we're actually trying to use the UIO subsystem on nommu (J2), > I'd like to start a discussion of what an acceptable patch would > entail. > > The uio_pdrv_genirq driver was tested on J2 with this patch and > interrupt handling works as expected. > > drivers/uio/Kconfig | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig > index 52c98ce..387b2bb 100644 > --- a/drivers/uio/Kconfig > +++ b/drivers/uio/Kconfig > @@ -1,6 +1,5 @@ > menuconfig UIO > tristate "Userspace I/O drivers" > - depends on MMU This doesn't seem to do much, don't you need to modify uio-specific drivers? Or given that the core uio code doesn't rely on mmu, is this safe? thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Rich Felker <dalias@libc.org> |
|---|---|
| Date | 2016-07-15 04:00 +0200 |
| Message-ID | <rV0A1-xW-11@gated-at.bofh.it> |
| In reply to | #1443859 |
On Fri, Jul 15, 2016 at 10:42:37AM +0900, Greg Kroah-Hartman wrote: > On Thu, Jul 14, 2016 at 08:53:06PM -0400, Rich Felker wrote: > > mmap of uio devices does not seem to work without further > > nommu-specific support, but interrupt handling already works, and > > userspace drivers for nommu systems can simply use physical mmio > > addresses from userspace directly anyway without mmap. > > > > Signed-off-by: Rich Felker <dalias@libc.org> > > --- > > > > I don't particularly expect this to be accepted upstream as-is, but > > since we're actually trying to use the UIO subsystem on nommu (J2), > > I'd like to start a discussion of what an acceptable patch would > > entail. > > > > The uio_pdrv_genirq driver was tested on J2 with this patch and > > interrupt handling works as expected. > > > > drivers/uio/Kconfig | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig > > index 52c98ce..387b2bb 100644 > > --- a/drivers/uio/Kconfig > > +++ b/drivers/uio/Kconfig > > @@ -1,6 +1,5 @@ > > menuconfig UIO > > tristate "Userspace I/O drivers" > > - depends on MMU > > This doesn't seem to do much, don't you need to modify uio-specific > drivers? Or given that the core uio code doesn't rely on mmu, is this > safe? As noted above, mmap of the device does not work (returns error); I don't understand why. But select/read/write for interrupt handling works fine, and the uio system is fully usable if you just do mmio via the raw addresses from userspace (this is nommu after all). I tested it with uio_pdrv_genirq bound to a fake DT node for the J2 IPI interrupt, disabling SMP and generating IPI interrupts manually to check that it worked. Rich
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-07-15 13:50 +0200 |
| Message-ID | <rV9MZ-6nQ-1@gated-at.bofh.it> |
| In reply to | #1443871 |
On Thu, Jul 14, 2016 at 09:58:29PM -0400, Rich Felker wrote: > On Fri, Jul 15, 2016 at 10:42:37AM +0900, Greg Kroah-Hartman wrote: > > On Thu, Jul 14, 2016 at 08:53:06PM -0400, Rich Felker wrote: > > > mmap of uio devices does not seem to work without further > > > nommu-specific support, but interrupt handling already works, and > > > userspace drivers for nommu systems can simply use physical mmio > > > addresses from userspace directly anyway without mmap. > > > > > > Signed-off-by: Rich Felker <dalias@libc.org> > > > --- > > > > > > I don't particularly expect this to be accepted upstream as-is, but > > > since we're actually trying to use the UIO subsystem on nommu (J2), > > > I'd like to start a discussion of what an acceptable patch would > > > entail. > > > > > > The uio_pdrv_genirq driver was tested on J2 with this patch and > > > interrupt handling works as expected. > > > > > > drivers/uio/Kconfig | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig > > > index 52c98ce..387b2bb 100644 > > > --- a/drivers/uio/Kconfig > > > +++ b/drivers/uio/Kconfig > > > @@ -1,6 +1,5 @@ > > > menuconfig UIO > > > tristate "Userspace I/O drivers" > > > - depends on MMU > > > > This doesn't seem to do much, don't you need to modify uio-specific > > drivers? Or given that the core uio code doesn't rely on mmu, is this > > safe? > > As noted above, mmap of the device does not work (returns error); I > don't understand why. Try working that out and then we can talk :) thanks, greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web