Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602305

Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory regions

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory regions
Date 2017-03-16 15:10 +0100
Message-ID <tlEgh-7RT-5@gated-at.bofh.it> (permalink)
References <tipQu-1uF-21@gated-at.bofh.it> <tlyXf-3YD-7@gated-at.bofh.it> <tlD0S-6Rt-15@gated-at.bofh.it> <tlDDA-7mM-19@gated-at.bofh.it> <tlDNf-7rG-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 16, 2017 at 02:33:25PM +0100, Michal Sojka wrote:
> On Thu, Mar 16 2017, Greg KH wrote:
> > On Thu, Mar 16, 2017 at 01:45:50PM +0100, Michal Sojka wrote:
> >> On Thu, Mar 16 2017, Greg KH wrote:
> >> > On Tue, Mar 07, 2017 at 03:09:46PM +0100, Michal Sojka wrote:
> >> >> Since commit b65502879556 ("uio: we cannot mmap unaligned page
> >> >> contents") addresses and sizes of UIO memory regions must be
> >> >> page-aligned. If the address in the BAR register is not page-aligned,
> >> >> the mentioned commit forces the UIO driver to round the address down
> >> >> to the page size. Then, there is no easy way for user-space to learn
> >> >> the offset of the actual memory region within the page, because the
> >> >> offset seen in the sysfs is calculated from the rounded address and
> >> >> thus it is always zero.
> >> >> 
> >> >> Fix that problem by including the offset in struct uio_mem. UIO
> >> >> drivers can set this field and its value is reported via sysfs.
> >> >
> >> > It is, where?
> >> 
> >> /sys/class/uio/uio0/maps/map0/offset
> >
> > Did you change the Documentation/ABI entry for it?
> 
> No, because it seems that UIO is not documented there.

Wow, it really isn't, that sucks, I messed up :(

But, the uio-howto.rst file should probably be updated, right?

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory  regions Greg KH <gregkh@linuxfoundation.org> - 2017-03-16 09:30 +0100
  Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory regions Michal Sojka <sojkam1@fel.cvut.cz> - 2017-03-16 13:50 +0100
    Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory  regions Greg KH <gregkh@linuxfoundation.org> - 2017-03-16 14:30 +0100
      Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory regions Michal Sojka <sojkam1@fel.cvut.cz> - 2017-03-16 14:40 +0100
        Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory  regions Greg KH <gregkh@linuxfoundation.org> - 2017-03-16 15:10 +0100
          Re: [PATCH 1/3] uio: Allow handling of non page-aligned memory regions Michal Sojka <sojkam1@fel.cvut.cz> - 2017-03-16 15:30 +0100
      [PATCH v2 2/3] uio_mf624: Refactor memory info initialization Michal Sojka <sojkam1@fel.cvut.cz> - 2017-03-16 15:00 +0100
      [PATCH v2 3/3] uio_mf624: Align memory regions to page size and set correct offsets Michal Sojka <sojkam1@fel.cvut.cz> - 2017-03-16 15:00 +0100
      [PATCH v2 1/3] uio: Allow handling of non page-aligned memory regions Michal Sojka <sojkam1@fel.cvut.cz> - 2017-03-16 15:00 +0100

csiph-web