[PATCH] Drop __GFP_COMP for DMA memory allocationsarch/arm/mm/consistent.c | 7 +++++++1 files changed, 7 insertions(+), 0 deletions(-)
From: Unknown
Date: Mon Jul 10 2006 - 22:38:47 EST
Hack for incompatible __GFP_COMP flag making its way into the ARM DMA
consistent memory allocator.
Signed-off-by: Marc Singer <elf@xxxxxxxxx>
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index 50e6b6b..7b7cc4e 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -153,6 +153,13 @@ __dma_alloc(struct device *dev, size_t s
unsigned long order;
u64 mask = ISA_DMA_THRESHOLD, limit;
+ /* 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 ARM as it is not supported on this
+ * platform--see CONFIG_HUGETLB_PAGE. */
+ gfp &= ~(__GFP_COMP);
+
if (!consistent_pte[0]) {
printk(KERN_ERR "%s: not initialised\n", __func__);
dump_stack();
--
1.4.0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/