From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: linux-input@atrey.karlin.mff.cuni.cz,
linux-kernel@vger.kernel.org, paulus@samba.org, anton@samba.org,
greg@kroah.com
Subject: Re: DMA APIs gumble grumble
Date: Fri, 10 Nov 2006 12:02:04 +1100 [thread overview]
Message-ID: <1163120524.4982.61.camel@localhost.localdomain> (raw)
In-Reply-To: <20061107.204653.44098205.davem@davemloft.net>
>
> Please just mirror what I did on sparc64 for sparc32, see changeset
> 42f142371e48fbc44956d57b4e506bb6ce673cd7, with followup bug fixes
> in 36321426e320c2c6bc2f8a1587d6f4d695fca84c and
> 7233589d77fdb593b482a8b7ee867e901f54b593.
Question about sparc. It's implementation of pci_alloc_consistent(),
unlike the other ones from before we had a GFP mask massed, does
GFP_KERNEL allocations and not GFP_ATOMIC. Thus it's never expected to
be called in atomic context. In fact, it does various other things like
calling allocate_resource which is not something you ever want to be
called from interrupt context.
I'm splitting it into a pci_do_alloc_consistent that takes a gfp arg,
and a pair of pci_alloc_consistent & dma_alloc_consistent wrappers.
Do you think I should have the former pass GFP_KERNEL like the current
implementation does or switch it to GFP_ATOMIC like everybody does ? In
this case, should I also change the kmalloc done in there to allocate a
struct resource to use the gfp argument ? (It's currently doing
GFP_KERNEL).
Cheers,
Ben.
next prev parent reply other threads:[~2006-11-10 1:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 1:54 DMA APIs gumble grumble Benjamin Herrenschmidt
2006-11-08 4:46 ` David Miller
2006-11-08 5:23 ` Benjamin Herrenschmidt
2006-11-08 5:29 ` David Miller
2006-11-08 5:44 ` Benjamin Herrenschmidt
2006-11-10 1:02 ` Benjamin Herrenschmidt [this message]
2006-11-10 2:50 ` David Miller
2006-11-10 2:55 ` Benjamin Herrenschmidt
2006-11-10 3:01 ` David Miller
2006-11-10 4:07 ` Benjamin Herrenschmidt
2006-11-08 8:25 ` Muli Ben-Yehuda
2006-11-08 8:47 ` Benjamin Herrenschmidt
2006-11-08 9:21 ` Muli Ben-Yehuda
2006-11-08 10:00 ` Benjamin Herrenschmidt
2006-11-08 22:56 ` Russell King
2006-11-08 23:41 ` Benjamin Herrenschmidt
2006-11-09 0:43 ` Benjamin Herrenschmidt
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=1163120524.4982.61.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=anton@samba.org \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
/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