iommu/omap-iovmm: support non page-aligned buffers in iommu_vmap
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 2 Sep 2011 17:32:30 +0000 (13:32 -0400)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 5 Sep 2011 13:14:37 +0000 (15:14 +0200)
commit329d8d3b474923087f6988737ff12137b58e55cc
tree9db30cae05fb15b6dfede6976aae1dfbd9dfd80d
parent024ae884a657f8ddeeff6b472c1fe538f277980e
iommu/omap-iovmm: support non page-aligned buffers in iommu_vmap

omap_iovmm requires page-aligned buffers, and that sometimes causes
omap3isp failures (i.e. whenever the buffer passed from userspace is not
page-aligned).

Remove this limitation by rounding the address of the first page entry
down, and adding the offset back to the device address.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
[ohad@wizery.com: rebased, but tested only with aligned buffers]
[ohad@wizery.com: slightly edited the commit log]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/omap-iovmm.c