lkml.org 
[lkml]   [2006]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] Compile failure fix for ppc on 2.6.17-rc4-mm3 (2nd attempt)
    Date
    >>>  arch/powerpc/kernel/built-in.o(.init.text+0x77b4): In function 
    >>> `vrsqrtefp':
    >>> : undefined reference to `__udivdi3'
    >>> arch/powerpc/kernel/built-in.o(.init.text+0x7800): In function
    >>> `vrsqrtefp':
    >>> : undefined reference to `__udivdi3'
    >>> make: *** [.tmp_vmlinux1] Error 1
    >>
    >> A function with a name like that doesn't _deserve_ to compile.

    Would vector_reciprocal_square_root_estimate_floating_point() be any
    better...
    Anyway, this is just a machine insn mnemonic, so the function name is
    fine
    I believe.

    > #define push_end(res, size) do { unsigned long __sz = (size) ; \
    > - res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \
    > + resource_size_t farEnd = (res->end + __sz); \
    > + do_div(farEnd, (__sz + 1)); \
    > + res->end = farEnd * (__sz + 1) + __sz; \
    > } while (0)

    Size here is a) a misnomer (size + 1 is the actual size) and b) always
    a power
    of two minus one. So instead, do

    #define push_end(res, mask) res->end = -(-res->end & ~(unsigned
    long)mask)

    (with a do { } while(0) armour if you prefer).


    Segher

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-05-29 18:26    [W:0.028 / U:1.504 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site