UIO memmap of PCi devices not working?
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Sep 7 17:16:52 AEST 2017
On Wed, 2017-09-06 at 15:20 +0000, Joakim Tjernlund wrote:
> Having problems to mmap PCI UIO devices and stumbeled over this page:
> http://billfarrow.blogspot.se/2010/09/userspace-access-to-pci-memory.html
> it claims some adjustments are needed for UIO mmap over PCI to work.
> These are #if 0 ATM and trying to enable them fails build.
>
> Can this be fixed to at least build again ?
> The reason for having #if 0 in the first place appears to be old X servers,
> is that still true? Can the special casing be removed now?
This article seems out of date... I *think* things should work without
change by just mmap'ing the appropriate sysfs files. I'm not sure why
the author thought that had to be ifdef'ed out...
Let me know if you have problems.
As far as I know, the generic code will call pci_resource_to_user()
which on powerpc will return a physical address that already includes
the offset, which is why we don't later add it.
Now we could probably tear all that out and use the new generic code
instead as I *think* X has (very) long been fixed but I'd have to spend
some time triple checking and testing on old HW which I don't have the
bandwidth for right now.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list