From: Tony Lindgren Date: Thu, 3 Nov 2005 00:18:23 +0000 (-0800) Subject: ARM: OMAP: Fix consistent_sync() X-Git-Tag: v2.6.15-omap2~115 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a9a31cc4ef3830e31766f03f55daa4b43e1d6dac;p=linux-2.6-omap-h63xx.git ARM: OMAP: Fix consistent_sync() It looks like consistent_sync() is off by one on arm as the dmac functions are being called with start and end instead of start and length. Also posted to linux-arm-kernel mailing list: http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2005-November/032037.html --- diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index 26356ce4da5..a1ed07d2b56 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c @@ -432,7 +432,7 @@ core_initcall(consistent_init); void consistent_sync(void *vaddr, size_t size, int direction) { unsigned long start = (unsigned long)vaddr; - unsigned long end = start + size; + unsigned long end = start + size - 1; switch (direction) { case DMA_FROM_DEVICE: /* invalidate only */