powerpc: DMA coherent allocations broken for CONFIG_NOT_COHERENT_CACHE
Grant Likely
grant.likely at secretlab.ca
Thu May 28 13:42:18 EST 2009
On Wed, May 27, 2009 at 9:34 PM, Sean MacLennan <smaclennan at pikatech.com> wrote:
> On Mon, 25 May 2009 14:33:43 +1000
> Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
>
>> This is going to .30 if nobody hollers. I've done some testing here
>> and it seems to be fine, but more eyes at this stage are much welcome.
>
> Sigh, I didn't get a chance to look at this until tonight. I use
> __dma_alloc_coherent in one of the warp drivers because I don't have a
> device to pass to dma_alloc_coherent. I was hoping to put it off until
> the summer.
>
> I assume I am scuppered without a device:
>
> [ 260.101751] coherent allocation too big (requested 0x5000 mask 0x0)
> [ 260.108054] pikadma: Unable to allocate SGL
>
> This is with a NULL passed as the device. And it looks
> like if the device is null, it just defaults to ISA_DMA_THRESHOLD,
> which is 0 as shown above.
>
> Is there a global platform device or something similar that I can
> piggyback off of? There is no bus associated with this driver, so no
> device.
Make your driver use a platform device or an of_platform device. It's
not at all hard.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev
mailing list