lkml.org 
[lkml]   [2004]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] nodemask_t x86_64 changes [5/7]
    Date
    On Tue, 23 Mar 2004 20:11:01 -0800, 
    Paul Jackson <pj@sgi.com> wrote:
    >I still don't know how I will fix the CPU_MASK_ALL static initializor in
    >the multi-word case - since I can't put runtime code in it.

    #define NR_CPUS_WORDS ((NR_CPUS+BITS_PER_LONG-1)/BITS_PER_LONG)
    #define NR_CPUS_UNDEF (NR_CPUS_WORDS*BITS_PER_LONG-NR_CPUS)

    #if NR_CPUS_UNDEF == 0
    #define CPU_MASK_ALL { [0 ... NR_CPUS_WORDS-1] = ~0UL }
    #else
    #define CPU_MASK_ALL { [0 ... NR_CPUS_WORDS-2] = ~0UL, ~0UL << NR_CPUS_UNDEF }
    #endif

    -
    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 14:01    [W:0.021 / U:0.112 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site