On Tue, Jul 11, 2006 at 03:34:11AM +1000, Nick Piggin wrote:
> >So I'll mask off __GFP_COMP for the time being in the ARM dma allocator
> >with a note to this effect?
>
> I believe that should do the trick, yes (AFAIK, nobody yet is
> explicitly relying on a compound page from the dma allocator).
>
> Marc can hopefully confim the fix.
The patch, attached, works in that there is no BUG_ON() trap.
>From c13ac90b1dd6e5fab63182ce323673cdffb0b55f Mon Sep 17 00:00:00 2001
Date: Mon, 10 Jul 2006 19:38:47 -0700
Subject: [PATCH] Drop __GFP_COMP for DMA memory allocations
---
arch/arm/mm/consistent.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
Hack for incompatible __GFP_COMP flag making its way into the ARM DMA
consistent memory allocator.
Signed-off-by: Marc Singer <[email protected]>
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- DMA memory, split_page, BUG_ON(PageCompound()), sound
- Re: DMA memory, split_page, BUG_ON(PageCompound()), sound
- Re: DMA memory, split_page, BUG_ON(PageCompound()), sound
- Re: DMA memory, split_page, BUG_ON(PageCompound()), sound
- Re: DMA memory, split_page, BUG_ON(PageCompound()), sound
- Re: DMA memory, split_page, BUG_ON(PageCompound()), sound
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]