summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-03 10:34:36 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-03 10:34:36 +0200
commitb5259d944279d0b7e78a83849a352d8ba0447c4c (patch)
tree42f0e7dc404bc776f9a736c17f52c121da166fc1 /lib
parent1c50b728c3e734150b8a4a8310ce3e01bc5c70be (diff)
parent94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff)
downloadlinux-b5259d944279d0b7e78a83849a352d8ba0447c4c.tar.gz
linux-b5259d944279d0b7e78a83849a352d8ba0447c4c.tar.bz2
linux-b5259d944279d0b7e78a83849a352d8ba0447c4c.zip
Merge commit 'v2.6.27-rc8' into core/rcu
Diffstat (limited to 'lib')
-rw-r--r--lib/scatterlist.c4
-rw-r--r--lib/swiotlb.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 876ba6d5b670..8d2688ff1352 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -422,9 +422,12 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents,
{
unsigned int offset = 0;
struct sg_mapping_iter miter;
+ unsigned long flags;
sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC);
+ local_irq_save(flags);
+
while (sg_miter_next(&miter) && offset < buflen) {
unsigned int len;
@@ -442,6 +445,7 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents,
sg_miter_stop(&miter);
+ local_irq_restore(flags);
return offset;
}
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 977edbdbc1de..8826fdf0f180 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -491,7 +491,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
* the lowest available address range.
*/
dma_addr_t handle;
- handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
+ handle = swiotlb_map_single(hwdev, NULL, size, DMA_FROM_DEVICE);
if (swiotlb_dma_mapping_error(hwdev, handle))
return NULL;