OSDN Git Service

bounce: fix cache maintenance for bounced highmem pages
authorGary King <gking@nvidia.com>
Mon, 6 Sep 2010 22:37:12 +0000 (15:37 -0700)
committerColin Cross <ccross@android.com>
Wed, 8 Sep 2010 21:35:06 +0000 (14:35 -0700)
the bounced page should be flushed after memcpy, to ensure that
architecture implementations can synchronize instruction and data
caches of the copied data.

Change-Id: I095a3463ec7fdaff3d0ff416f5648bc661fb5f8a
Signed-off-by: Gary King <gking@nvidia.com>
mm/bounce.c

index 13b6dad..1481de6 100644 (file)
@@ -116,8 +116,8 @@ static void copy_to_high_bio_irq(struct bio *to, struct bio *from)
                 */
                vfrom = page_address(fromvec->bv_page) + tovec->bv_offset;
 
-               flush_dcache_page(tovec->bv_page);
                bounce_copy_vec(tovec, vfrom);
+               flush_dcache_page(tovec->bv_page);
        }
 }