Re: [PATCH v2 1/2] dma-contiguous: Abstract dma_{alloc, free}_contiguous()

2019-05-23 Thread Nicolin Chen
On Thu, May 23, 2019 at 08:59:30PM -0600, dann frazier wrote: > > > diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c > > > index b2a87905846d..21f39a6cb04f 100644 > > > --- a/kernel/dma/contiguous.c > > > +++ b/kernel/dma/contiguous.c > > > @@ -214,6 +214,54 @@ bool

Re: [PATCH v2 1/2] dma-contiguous: Abstract dma_{alloc, free}_contiguous()

2019-05-23 Thread dann frazier
On Thu, May 23, 2019 at 7:52 PM dann frazier wrote: > > On Mon, May 6, 2019 at 4:35 PM Nicolin Chen wrote: > > > > Both dma_alloc_from_contiguous() and dma_release_from_contiguous() > > are very simply implemented, but requiring callers to pass certain > > parameters like count and align, and

Re: [PATCH v2 1/2] dma-contiguous: Abstract dma_{alloc, free}_contiguous()

2019-05-23 Thread dann frazier
On Mon, May 6, 2019 at 4:35 PM Nicolin Chen wrote: > > Both dma_alloc_from_contiguous() and dma_release_from_contiguous() > are very simply implemented, but requiring callers to pass certain > parameters like count and align, and taking a boolean parameter to > check __GFP_NOWARN in the

[PATCH v2 1/2] dma-contiguous: Abstract dma_{alloc, free}_contiguous()

2019-05-06 Thread Nicolin Chen
Both dma_alloc_from_contiguous() and dma_release_from_contiguous() are very simply implemented, but requiring callers to pass certain parameters like count and align, and taking a boolean parameter to check __GFP_NOWARN in the allocation flags. So every function call duplicates similar work: /*