All of lore.kernel.org
 help / color / mirror / Atom feed
* arm_vmregion_alloc call
       [not found] <CAOmFF13Cif=K62oHR3QEg-ni0X0EopxtOXM7LGkF9FJd2WCZKg@mail.gmail.com>
@ 2012-07-02 13:48 ` Robert Beckett
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Beckett @ 2012-07-02 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

I just debugged a problem with a USB driver where it was calling
dma_alloc_coherent with a GFP_DMA32 flag.
It turned out that in __dma_alloc_remap, it clears the GFP_DMA and
GFP_HIGHMEM flags when calling arm_vmregion_alloc so that it does not clash
with the slab allocator flag requirements, but it does not clear GFP_DMA32.
The GFP_SLAB_BUG_MASK includes GFP_DMA32, so this looks like a bug to me.
Should it be clearing GFP_DMA32 as well as GFP_DMA and GFP_HIGHMEM ?

I checked in the latest kernel.org code, and the issue is still there.

Is this a bug, or should it just be calling with GFP_DMA instead of
GFP_DMA32?

For now, I am working around it by using GFP_DMA in the dma_alloc_coherent
call as we have no GFP_DMA lower limit, so GFP_DMA and GFP_DMA32 are the
same on my architecture.

Any advice appreciated,

Thanks

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120702/2b683745/attachment-0001.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* arm_vmregion_alloc call
@ 2012-07-02 13:57 Robert Beckett
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Beckett @ 2012-07-02 13:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

I just debugged a problem with a USB driver where it was calling
dma_alloc_coherent with a GFP_DMA32 flag.
It turned out that in __dma_alloc_remap, it clears the GFP_DMA and
GFP_HIGHMEM flags when calling arm_vmregion_alloc so that it does not
clash with the slab allocator flag requirements, but it does not clear
GFP_DMA32. The GFP_SLAB_BUG_MASK includes GFP_DMA32, so this looks
like a bug to me. Should it be clearing GFP_DMA32 as well as GFP_DMA
and GFP_HIGHMEM ?

I checked in the latest kernel.org code, and the issue is still there.

Is this a bug, or should it just be calling with GFP_DMA instead of GFP_DMA32?

For now, I am working around it by using GFP_DMA in the
dma_alloc_coherent call as we have no GFP_DMA lower limit, so GFP_DMA
and GFP_DMA32 are the same on my architecture.

Any advice appreciated,

Thanks

Bob

p.s. apologies if this sent multiple times, Im trying to work around
the mailing list "suspicious header" moderation...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* arm_vmregion_alloc call
@ 2012-07-02 13:52 Robert Beckett
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Beckett @ 2012-07-02 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

I just debugged a problem with a USB driver where it was calling
dma_alloc_coherent with a GFP_DMA32 flag.
It turned out that in __dma_alloc_remap, it clears the GFP_DMA and
GFP_HIGHMEM flags when calling arm_vmregion_alloc so that it does not clash
with the slab allocator flag requirements, but it does not clear GFP_DMA32.
The GFP_SLAB_BUG_MASK includes GFP_DMA32, so this looks like a bug to me.
Should it be clearing GFP_DMA32 as well as GFP_DMA and GFP_HIGHMEM ?

I checked in the latest kernel.org code, and the issue is still there.

Is this a bug, or should it just be calling with GFP_DMA instead of
GFP_DMA32?

For now, I am working around it by using GFP_DMA in the dma_alloc_coherent
call as we have no GFP_DMA lower limit, so GFP_DMA and GFP_DMA32 are the
same on my architecture.

Any advice appreciated,

Thanks

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120702/a710cc1c/attachment-0001.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-02 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAOmFF13Cif=K62oHR3QEg-ni0X0EopxtOXM7LGkF9FJd2WCZKg@mail.gmail.com>
2012-07-02 13:48 ` arm_vmregion_alloc call Robert Beckett
2012-07-02 13:52 Robert Beckett
2012-07-02 13:57 Robert Beckett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.