lkml.org 
[lkml]   [2004]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: seperator error in __mask_snprintf_len
    Paul M, replying to Paul J:
    > > If this request proceeds as expected, I will follow up with a patch to
    > > lib/mask.c that will likely make use of the cpu_to_le32() and
    > > le32_to_cpu() macros in byteorder.h to swap bytes in the u32 words being
    > > displayed and parsed.
    >
    > That would be the wrong approach IMHO.

    Ok - I agree that this would be wrong for 64 bit sparc and ppc, for
    these architectures use native big endian byte order within cpumasks,
    not little endian.

    Indeed, I take it that this applies not just to cpumasks, but to any
    mask-like operand that bitops such as ffs() are applied to.

    I also need to examine the 32 bit big endian architectures, to see
    whether their cpumasks, and other bitop operands, are big or little
    endian. If they are big endian (native order) then my mask printing and
    scanning code should always presume native byte order, and only has to
    special case the order of two u32 words within a u64 long on 64 bit big
    endian architectures. If they are little endian, then I'll also need to
    make use of the cpu_to_le32() and le32_to_cpu() macros in byteorder.h to
    swap bytes in the u32 words being displayed and parsed (but _not_ for
    sparc64 or ppc).

    --
    I won't rest till it's the best ...
    Programmer, Linux Scalability
    Paul Jackson <pj@sgi.com> 1.650.933.1373
    -
    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: 2005-03-22 13:59    [W:4.095 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site