lkml.org 
[lkml]   [2014]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectbroken UIO functionality for mmap in linux stable
Hello kernel developers,

I have some problems with UIO driver.
To be exact the problem is with uio_mmap_physical function from
drivers/uio/uio.c.

Problems were introduced by commits:
b65502879556d041b45104c6a35abbbba28c8f2d
7314e613d5ff9f0934f7a0f74ed7973b903315d1

These commits added checks if address and size are page aligned.
Of course this is correct for the "mmap" call, but currently there is
no way to store offset in the UIO driver.
Function "map_offset_show" will always return/store 0 with the page
aligned addresses.

Is it possible to add additional field called "offset" to struct uio_mem?
The "addr" could be renamed to "base" and store address with page granularity.
Then this field should be checked in the "uio_mmap_physical" function
instead of "addr".

Beside of this size of the map in the device is not always page aligned.
For example in my device this value is often set to 4.
Should I change this value to be page aligned (i.e. 0x1000 in DTS) and
"remember" the correct size in the user space program which is
managing the device? Maybe there is some other way?

Pozdrawiam / Best regards,

Norbert Ciosek


\
 
 \ /
  Last update: 2014-04-18 10:41    [W:0.062 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site