summaryrefslogtreecommitdiff
path: root/packages/linux/linux-2.6.18/avr32-drop-GFP_COMP-for-DMA-memory-allocations.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-09-14 07:43:03 +0000
committerKoen Kooi <koen@openembedded.org>2007-09-14 07:43:03 +0000
commit2019b37bac10cff32469452eb3061e6e8e8aaad4 (patch)
tree79aa76f03f001988977386a9c13e59cebfe7c57b /packages/linux/linux-2.6.18/avr32-drop-GFP_COMP-for-DMA-memory-allocations.patch
parent7a5c873a58cdc4130eb4a14c5af0960f8ec6d81a (diff)
parenta50f3c05fc84d7d914e6a8287c82581462302bbe (diff)
propagate from branch 'org.openembedded.dev' (head bbdff51149f19a443ea4c897e2b4eb81eec6283a)
to branch 'org.openembedded.dev.avr32' (head ef59785d9aa6d25f6cf33266a65b61426e620f71)
Diffstat (limited to 'packages/linux/linux-2.6.18/avr32-drop-GFP_COMP-for-DMA-memory-allocations.patch')
-rw-r--r--packages/linux/linux-2.6.18/avr32-drop-GFP_COMP-for-DMA-memory-allocations.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/linux/linux-2.6.18/avr32-drop-GFP_COMP-for-DMA-memory-allocations.patch b/packages/linux/linux-2.6.18/avr32-drop-GFP_COMP-for-DMA-memory-allocations.patch
new file mode 100644
index 0000000000..eea690268c
--- /dev/null
+++ b/packages/linux/linux-2.6.18/avr32-drop-GFP_COMP-for-DMA-memory-allocations.patch
@@ -0,0 +1,27 @@
+Hack for incompatible __GFP_COMP flag making its way into the AVR32
+DMA consistent memory allocator.
+
+This is essentially the same patch as the one submitted by
+Marc Singer <elf@buici.com> for ARM.
+---
+ arch/avr32/mm/dma-coherent.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+Index: linux-2.6.18-avr32/arch/avr32/mm/dma-coherent.c
+===================================================================
+--- linux-2.6.18-avr32.orig/arch/avr32/mm/dma-coherent.c 2006-09-11 18:06:00.000000000 +0200
++++ linux-2.6.18-avr32/arch/avr32/mm/dma-coherent.c 2006-09-12 13:38:39.000000000 +0200
+@@ -41,6 +41,13 @@ static struct page *__dma_alloc(struct d
+ struct page *page, *free, *end;
+ int order;
+
++ /* Following is a work-around (a.k.a. hack) to prevent pages
++ * with __GFP_COMP being passed to split_page() which cannot
++ * handle them. The real problem is that this flag probably
++ * should be 0 on AVR32 as it is not supported on this
++ * platform--see CONFIG_HUGETLB_PAGE. */
++ gfp &= ~(__GFP_COMP);
++
+ size = PAGE_ALIGN(size);
+ order = get_order(size);
+