[lkml]   [2004]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] mask ADT: bitmap and bitop tweaks [1/22]
    > akpm, this is needed for mainline.

    How urgent to you consider this fix (masking unused bits in the
    arithmetic (single unsigned long word) cpumask implementation?

    So far as I know, the only way to get high bits set with correct
    invocations is by using cpus_complement(), which I don't see anyone

    So I believe that this patch fixes latent bugs, not current bugs.

    And it would be my preference (not surprisingly) to fix this in a way
    that is consistent with my mask ADT proposal (avoid setting unused bits
    on proper calls; don't filter on Boolean/scalar predicate evaluations):

    +#define __CPU_VALID_MASK__ (~((1UL<< (NR_CPUS%BITS_PER_LONG) - 1))
    +#define __CPU_VALID_MASK__ (~0UL)

    -#define cpus_complement(map) do { map = ~(map); } while (0)
    +#define cpus_complement(map) \
    + do { map = ~(map) & __CPU_VALID_MASK__; } while (0)

    _instead_ of changing the several other macros to follow the
    bitmap convention (let the unused bits remain dont-care, until
    resolving a Boolean or scalar predicate).

    I won't rest till it's the best ...
    Programmer, Linux Scalability
    Paul Jackson <> 1.650.933.1373
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:02    [W:0.021 / U:3.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site