Messages in this thread | | | Date | Wed, 24 Feb 2010 14:47:32 +0100 | From | "Hans J. Koch" <> | Subject | Re: UIO support for >32-bit physical addresses on 32-bit platforms |
| |
On Tue, Feb 23, 2010 at 09:24:42PM -0600, Kumar Gala wrote: > > Well, UIO is (up to now) completely independent of the architecture. If you've > > got a good idea how to implement such mappings, feel free to come up with your > > suggestions/patches. Just changing struct uio_mem.addr to u64 is certainly not > > enough. > > > > I'll give it some thoughts myself, and will discuss the problem with friends, > > maybe there's a nice solution. Help from your side is much appreciated. > > For my needs I believe changing uio_mem.addr to a u64 is sufficient for getting UIO_MEM_PHYS to work for the physical address being above 4G. I need the type to be large to represent a wider PFN range. Obviously there are limitations (ie, we can't make an IO region >4G in size, etc.) >
Hmm, after some research it seems you're right. But the type for the addr member of struct uio_mem should be phys_addr_t, not u64. phys_addr_t is an u64 on systems that support it, and an u32 otherwise.
It'll probably work with UIO_MEM_LOGICAL and UIO_MEM_VIRTUAL as well.
Could you hack up a patch to that effect, and test it? If it works for you, I think we should apply it.
Thanks for pointing this out.
Hans
> - k
| |