From: Gary King Date: Thu, 9 Sep 2010 23:38:05 +0000 (-0700) Subject: bounce: call flush_dcache_page() after bounce_copy_vec() X-Git-Tag: v2.6.27.54~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c0a328941a72e32e194c3dcc9802b5970f55d9e9;p=karo-tx-linux.git bounce: call flush_dcache_page() after bounce_copy_vec() commit ac8456d6f9a3011c824176bd6084d39e5f70a382 upstream. I have been seeing problems on Tegra 2 (ARMv7 SMP) systems with HIGHMEM enabled on 2.6.35 (plus some patches targetted at 2.6.36 to perform cache maintenance lazily), and the root cause appears to be that the mm bouncing code is calling flush_dcache_page before it copies the bounce buffer into the bio. The bounced page needs to be flushed after data is copied into it, to ensure that architecture implementations can synchronize instruction and data caches if necessary. Signed-off-by: Gary King Cc: Tejun Heo Cc: Russell King Acked-by: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/bounce.c b/mm/bounce.c index b6d2d0f1019b..e83e28035746 100644 --- a/mm/bounce.c +++ b/mm/bounce.c @@ -114,8 +114,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); } }