diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-03 10:34:36 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-03 10:34:36 +0200 |
commit | b5259d944279d0b7e78a83849a352d8ba0447c4c (patch) | |
tree | 42f0e7dc404bc776f9a736c17f52c121da166fc1 /lib | |
parent | 1c50b728c3e734150b8a4a8310ce3e01bc5c70be (diff) | |
parent | 94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff) | |
download | op-kernel-dev-b5259d944279d0b7e78a83849a352d8ba0447c4c.zip op-kernel-dev-b5259d944279d0b7e78a83849a352d8ba0447c4c.tar.gz |
Merge commit 'v2.6.27-rc8' into core/rcu
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scatterlist.c | 4 | ||||
-rw-r--r-- | lib/swiotlb.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 876ba6d..8d2688f 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 977edbd..8826fdf 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; |