]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bounce: call flush_dcache_page() after bounce_copy_vec()
authorGary King <gking@nvidia.com>
Thu, 9 Sep 2010 23:38:05 +0000 (16:38 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:37 +0000 (13:36 -0700)
commitcfa7e5c5fce001efa3d35c84229aec67ae6ade7a
tree6ae9a3c24f72830fb1149384f34f70aae83198d9
parentb49853780d6aaf8a5cccf6667648e428719f8f3e
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 <gking@nvidia.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/bounce.c