[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTi=kP0LQ4Hx_uA8viA59aDnb1KePyQ@mail.gmail.com>
Date: Mon, 20 Jun 2011 10:10:04 -0700
From: Ray Lee <ray-lk@...rabbit.org>
To: Ryan Mallon <rmallon@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, Petr Tesarik <ptesarik@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Fenghua Yu <fenghua.yu@...el.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Paul Mundt <lethal@...ux-sh.org>,
Russell King <linux@....linux.org.uk>,
Thomas Gleixner <tglx@...utronix.de>,
Tony Luck <tony.luck@...el.com>, x86@...nel.org,
linux-arm-kernel@...ts.infradead.org, linux-ia64@...r.kernel.org,
linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org,
Arjan van de Ven <arjan@...radead.org>,
Dave Jones <davej@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 00/10] Enhance /dev/mem to allow read/write of arbitrary
physical addresses
On Sun, Jun 19, 2011 at 4:02 PM, Ryan Mallon <rmallon@...il.com> wrote:
> On 17/06/11 19:30, Ingo Molnar wrote:
>> - there's some really horrible out-of-tree drivers that do mmap()s
>> via /dev/mem, those should be fixed if they want to move beyond
>> 4G: their char device should be mmap()able.
>
> There are drivers where this makes sense. For example an FPGA device with a
> proprietary register layout on the memory bus can be done this way. The FPGA
> can simply be mapped in user-space via /dev/mem and handled there. If the
> device requires no access other than memory bus reads and writes then
> writing a custom char device driver just to get an mmap function seems a bit
> overkill.
While VFIO is still out-of-tree, it handles this use-case, as well as
interrupts and transparent DMA remapping via the IOMMU. I'm using it
on a current project and it works as advertised. UIO is in-tree and
also handles this (as I understand it), but without DMA or interrupt
support.
https://github.com/pugs/vfio-linux-2.6/blob/vfio/Documentation/vfio.txt
It's perhaps arguable whether any human with taste should ship a
driver based on UIO/VFIO, but for code that exists solely to exercise
and test a hardware design, it works great.
~r.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists