Re: [PATCH] nodemask_t x86_64 changes [5/7]

From: Keith Owens
Date: Fri Mar 26 2004 - 00:08:53 EST


On Tue, 23 Mar 2004 20:11:01 -0800,
Paul Jackson <pj@xxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/