public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: linuxppc-dev@ozlabs•org
Cc: Albert Herranz <albert_herranz@yahoo•es>, Ilya Yanok <yanok@emcraft•com>
Subject: Re: powerpc: DMA coherent allocations broken for CONFIG_NOT_COHERENT_CACHE
Date: Mon, 25 May 2009 02:43:14 +0100	[thread overview]
Message-ID: <200905250243.15436.arnd@arndb.de> (raw)
In-Reply-To: <1243210914.24376.11.camel@pasglop>

On Monday 25 May 2009, Benjamin Herrenschmidt wrote:
> Note that I still think the right approach in the long run is to ban the
> consistent allocs from atomic contexts generically in linux, though that
> will be a hard nut to crack.

I might be missing too much context here, but can't we make drivers that
need this allocate an uncached memory range at setup time and call
dma_declare_coherent_memory() on that to make a later dma_alloc_coherent()
succeed without GFP_KERNEL?

If that is not enough, dma_alloc_coherent could be changed to
try dma_alloc_from_coherent() on the bridge device (PCI HB,
PLB4, ...), if we reserve a reasonably sized amount of uncached
memory for each bridge that has noncoherent devices.

	Arnd <><

  reply	other threads:[~2009-05-25  1:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 16:50 powerpc: DMA coherent allocations broken for CONFIG_NOT_COHERENT_CACHE Albert Herranz
2009-05-24  6:47 ` Grant Likely
2009-05-24 10:21   ` Benjamin Herrenschmidt
2009-05-25  0:21     ` Benjamin Herrenschmidt
2009-05-25  1:43       ` Arnd Bergmann [this message]
2009-05-25  4:19         ` Benjamin Herrenschmidt
2009-05-25  4:33         ` Benjamin Herrenschmidt
2009-05-25  5:50           ` Grant Likely
2009-05-25  6:49             ` Benjamin Herrenschmidt
2009-05-28  3:34           ` Sean MacLennan
2009-05-28  3:42             ` Grant Likely
2009-05-28  5:00               ` Sean MacLennan
2009-05-28  5:09                 ` Grant Likely
2009-05-28  3:52             ` Benjamin Herrenschmidt
2009-05-28  4:11               ` Sean MacLennan
2009-05-28  4:19                 ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2009-05-26 17:13 Albert Herranz

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=200905250243.15436.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=albert_herranz@yahoo$(echo .)es \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=yanok@emcraft$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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