[PATCH] make devmem map only a single page at end of memory

Denys Vlasenko vda.linux at googlemail.com
Wed Apr 14 20:36:17 UTC 2010


On Tue, Apr 13, 2010 at 4:35 AM, Jörgen Pihlflyckt
<jorgen.pihlflyckt at gmail.com> wrote:
> Hi!
>
> I noticed that the devmem applet maps two consecutive pages of memory in order
> to allow access to a (non-aligned) object that spans two pages. This is a
> problem if we are working with the last page of memory because the next page
> would wrap around to the first page of memory.
>
> This patch makes devmem map only a single page if it is at the end of the
> memory address space.

How about this patch? It maps two pages only if needed.
It will (try to) map past the end, but only if user actually
request an access which spans the end of last page.
-- 
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7.patch
Type: application/octet-stream
Size: 1971 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20100414/cd4d0c68/attachment.obj>


More information about the busybox mailing list