From: Marc Singer <elf@buici.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: DMA memory, split_page, BUG_ON(PageCompound()), sound
Date: Mon, 10 Jul 2006 19:51:43 -0700 [thread overview]
Message-ID: <20060711025142.GB31463@buici.com> (raw)
In-Reply-To: <44B28F93.9020304@yahoo.com.au>
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 <elf@buici.com>
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
next prev parent reply other threads:[~2006-07-11 2:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-09 0:07 DMA memory, split_page, BUG_ON(PageCompound()), sound Marc Singer
2006-07-09 3:26 ` Nick Piggin
2006-07-10 2:51 ` Marc Singer
2006-07-10 6:59 ` Nick Piggin
2006-07-10 16:26 ` Russell King
2006-07-10 17:34 ` Nick Piggin
2006-07-10 22:27 ` Marc Singer
2006-07-11 2:51 ` Marc Singer [this message]
2006-07-12 10:32 ` Russell King
2006-07-13 13:30 ` Takashi Iwai
2006-07-13 13:38 ` Nick Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060711025142.GB31463@buici.com \
--to=elf@buici.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox