Keir Fraser df336d1c7b Fix swiotlb_sync_single_range()
If the swiotlb maps a multi-slab region, swiotlb_sync_single_range() can be
invoked to sync a sub-region which does not include the first slab.
Unfortunately io_tlb_orig_addr[] is only initialised for the first slab,
and hence the call to sync_single() will read a garbage orig_addr in this
case.

This patch fixes the issue by initialising all mapped slabs in
io_tlb_orig_addr[].  It also correctly adjusts the buffer pointer in
sync_single() to handle the case that the given dma_addr is not aligned on
a slab boundary.

Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21 17:49:14 -07:00
..
2007-07-10 17:51:13 -07:00
2005-10-18 08:26:15 -07:00
2007-07-18 08:47:40 -07:00
2007-05-11 05:38:25 -04:00
2007-07-16 09:05:50 -07:00
2007-07-17 10:23:04 -07:00
2006-06-25 10:01:20 -07:00
2005-04-16 15:20:36 -07:00
2006-06-25 10:01:20 -07:00
2007-05-10 18:24:13 +02:00
2005-04-16 15:20:36 -07:00
2007-04-25 22:28:53 -07:00
2005-04-16 15:20:36 -07:00
2007-05-08 11:14:58 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2007-06-08 17:23:34 -07:00
2006-06-20 20:24:58 -07:00
2007-05-21 09:18:19 -07:00
2006-10-06 08:53:40 -07:00
2007-07-17 10:23:04 -07:00
2007-07-19 10:04:49 -07:00
2006-06-25 10:01:09 -07:00
2007-07-18 08:47:40 -07:00
2005-04-16 15:20:36 -07:00
2006-12-04 02:00:22 -05:00
2007-07-21 17:49:14 -07:00
2007-02-17 19:07:33 +01:00