lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 05/25] lmb: Factor the lowest level alloc function
    From
    Date
    On Tue, 2010-05-11 at 14:30 +0200, Thomas Gleixner wrote:
    > On Mon, 10 May 2010, Benjamin Herrenschmidt wrote:
    > >
    > > @@ -396,33 +406,24 @@ u64 __init __lmb_alloc_base(u64 size, u64 align, u64 max_addr)
    > > if (max_addr == LMB_ALLOC_ANYWHERE)
    > > max_addr = LMB_REAL_LIMIT;
    > >
    > > + /* Pump up max_addr */
    > > + if (max_addr == LMB_ALLOC_ANYWHERE)
    > > + max_addr = ~(u64)0;
    > > +
    >
    > That if is pretty useless as you set max_addr to LMB_REAL_LIMIT
    > right above.

    Well, actually no :-) LMB_REAL_LIMIT can actually be == to
    LMB_ALLOC_ANYWHERE which at this stage in the series is still 0, so we
    must not miss the second bit.

    Subsequent patches remove this anyways as LMB_ALLOC_ANYWHERE gets turned
    into ~0 which makes more sense.

    So it's a bit weird looking, but it's correct and transitory code only.

    Cheers,
    Ben.




    \
     
     \ /
      Last update: 2010-05-12 10:15    [W:0.018 / U:88.960 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site