diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-03 04:34:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-03 04:34:36 -0400 |
commit | b5259d944279d0b7e78a83849a352d8ba0447c4c (patch) | |
tree | 42f0e7dc404bc776f9a736c17f52c121da166fc1 /lib | |
parent | 1c50b728c3e734150b8a4a8310ce3e01bc5c70be (diff) | |
parent | 94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff) |
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 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, | |||
422 | { | 422 | { |
423 | unsigned int offset = 0; | 423 | unsigned int offset = 0; |
424 | struct sg_mapping_iter miter; | 424 | struct sg_mapping_iter miter; |
425 | unsigned long flags; | ||
425 | 426 | ||
426 | sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC); | 427 | sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC); |
427 | 428 | ||
429 | local_irq_save(flags); | ||
430 | |||
428 | while (sg_miter_next(&miter) && offset < buflen) { | 431 | while (sg_miter_next(&miter) && offset < buflen) { |
429 | unsigned int len; | 432 | unsigned int len; |
430 | 433 | ||
@@ -442,6 +445,7 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, | |||
442 | 445 | ||
443 | sg_miter_stop(&miter); | 446 | sg_miter_stop(&miter); |
444 | 447 | ||
448 | local_irq_restore(flags); | ||
445 | return offset; | 449 | return offset; |
446 | } | 450 | } |
447 | 451 | ||
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, | |||
491 | * the lowest available address range. | 491 | * the lowest available address range. |
492 | */ | 492 | */ |
493 | dma_addr_t handle; | 493 | dma_addr_t handle; |
494 | handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE); | 494 | handle = swiotlb_map_single(hwdev, NULL, size, DMA_FROM_DEVICE); |
495 | if (swiotlb_dma_mapping_error(hwdev, handle)) | 495 | if (swiotlb_dma_mapping_error(hwdev, handle)) |
496 | return NULL; | 496 | return NULL; |
497 | 497 | ||