aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-23 17:26:42 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-23 17:26:42 -0400
commit07bbc16a8676b06950a21f35b59f69b2fe763bbd (patch)
treef87fbfea747e9d92591c8d0a54db7c487e3c3d78 /lib
parent6a9e91846bf52cc70a0417de19fdfac224c435c4 (diff)
parentf8e256c687eb53850685747757c8d75e58756e15 (diff)
Merge branch 'timers/urgent' into x86/xen
Conflicts: arch/x86/kernel/process_32.c arch/x86/kernel/process_64.c Manual merge: arch/x86/kernel/smpboot.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
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,
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