Skip to content

Commit

Permalink
bounce: call flush_dcache_page() after bounce_copy_vec()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Russell King <[email protected]>
Acked-by: Jens Axboe <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Gary King authored and torvalds committed Sep 10, 2010
1 parent 4701643 commit ac8456d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/bounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit ac8456d

Please sign in to comment.