diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-28 09:49:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-28 09:49:27 -0700 |
commit | 0d8762c9ee40cf83d5dbf3a22843bc566912b592 (patch) | |
tree | d3ae691a55226e3671caa1f837e127693f6742e8 /lib | |
parent | cf76dddb22c019f03ada6479210f894f19bd591b (diff) | |
parent | 6afe40b4dace385d7ba2faf24b352f066f3b71bf (diff) | |
download | kernel-common-0d8762c9ee40cf83d5dbf3a22843bc566912b592.tar.gz kernel-common-0d8762c9ee40cf83d5dbf3a22843bc566912b592.tar.bz2 kernel-common-0d8762c9ee40cf83d5dbf3a22843bc566912b592.zip |
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: fix irqs on/off ip tracing
lockdep: minor fix for debug_show_all_locks()
x86: restore the old swiotlb alloc_coherent behavior
x86: use GFP_DMA for 24bit coherent_dma_mask
swiotlb: remove panic for alloc_coherent failure
xen: compilation fix of drivers/xen/events.c on IA64
xen: portability clean up and some minor clean up for xencomm.c
xen: don't reload cr3 on suspend
kernel/resource: fix reserve_region_with_split() section mismatch
printk: remove unused code from kernel/printk.c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/swiotlb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index f8eebd489149..78330c37a61b 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -497,8 +497,10 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size, printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016Lx\n", (unsigned long long)*hwdev->dma_mask, (unsigned long long)dev_addr); - panic("swiotlb_alloc_coherent: allocated memory is out of " - "range for device"); + + /* DMA_TO_DEVICE to avoid memcpy in unmap_single */ + unmap_single(hwdev, ret, size, DMA_TO_DEVICE); + return NULL; } *dma_handle = dev_addr; return ret; |