summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-30 14:26:45 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-30 14:26:45 +0000
commit05cd2544f4b64d9a9eca0d170191867495e01feb (patch)
tree10146fb79bba464bac6f620d03b8cd50285065b7 /lib
parent27f680adc65ca08bf72ed85d3a48d1ee70f77c7a (diff)
parenta0601c8944dc08c2d349c24bd9c0b09c406229fc (diff)
downloadkernel-crypto-05cd2544f4b64d9a9eca0d170191867495e01feb.tar.gz
kernel-crypto-05cd2544f4b64d9a9eca0d170191867495e01feb.tar.xz
kernel-crypto-05cd2544f4b64d9a9eca0d170191867495e01feb.zip
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile2
-rw-r--r--lib/swiotlb.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 16feaab057b..7cb65d85aeb 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -2,7 +2,7 @@
# Makefile for some libs needed in the kernel.
#
-ifdef CONFIG_FTRACE
+ifdef CONFIG_FUNCTION_TRACER
ORIG_CFLAGS := $(KBUILD_CFLAGS)
KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
endif
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index f8eebd48914..78330c37a61 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;