[PATCH 2/2] rheap: move rheap.c from arch/powerpc/lib/ to lib/
Scott Wood
scottwood at freescale.com
Thu Jul 9 16:47:13 AEST 2015
On Thu, 2015-07-09 at 01:14 -0500, Zhao Qiang-B45475 wrote:
> On Wed, 2015-07-09 at 02:09PM -0500, Wood Scott wrote:
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Thursday, July 09, 2015 2:09 PM
> > To: Zhao Qiang-B45475
> > Cc: linuxppc-dev at lists.ozlabs.org; Xie Xiaobo-R63061
> > Subject: Re: [PATCH 2/2] rheap: move rheap.c from arch/powerpc/lib/ to
> > lib/
> >
> > On Thu, 2015-07-09 at 01:05 -0500, Zhao Qiang-B45475 wrote:
> > > On Wed, 2015-07-09 at 11:51 -0500, Wood Scott wrote:
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Thursday, July 09, 2015 11:51 AM
> > > > To: Zhao Qiang-B45475
> > > > Cc: linuxppc-dev at lists.ozlabs.org; Xie Xiaobo-R63061
> > > > Subject: Re: [PATCH 2/2] rheap: move rheap.c from arch/powerpc/lib/
> > > > to lib/
> > > >
> > > > That doesn't involve a different alignment for each allocation. It
> > > > uses the same alignment for all of them, and the alignment that
> > > > cpm_common.c provides to rh_init() is 1 byte.
> > > >
> > > > ...but sigh, cpm_muram_alloc() is changing cpm_muram_info.alignment
> > > > behind the rheap code's back. Despite the existence of
> > rh_alloc_align().
> > > >
> > > > So yes, add aligned allocation functionality to genalloc, but don't
> > > > duplicate
> > > > gen_pool_alloc() to do so. Instead, rename gen_pool_alloc() to
> > > > gen_pool_alloc_align() with an alignment parameter (also modifying
> > > > the algo function to take an alignment arg, which
> > > > gen_pool_first_fit_order_align() would ignore), and provide a
> > >
> > > Here, I don’t understand how to handle the algo In your mind.
> > > Can you explain more detailly?
> >
> > The algorithms would be unchanged except that they would receive a new
> > alignment (or alignment mask) parameter. gen_pool_first_fit_order_align()
> > would ignore it, but the other algorithms would pass it through to the
> > bitmap allocator.
>
> How about to add an align_mask parameter to gen_pool_first_fit?
All of the algorithms have to have the same function signature.
-Scott
More information about the Linuxppc-dev
mailing list