lkml.org 
[lkml]   [2004]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] nodemask_t x86_64 changes [5/7]
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.

On Fri, Mar 26, 2004 at 04:06:34PM +1100, Keith Owens wrote:
> #define NR_CPUS_WORDS ((NR_CPUS+BITS_PER_LONG-1)/BITS_PER_LONG)

This looks suspiciously like BITS_TO_LONGS(NR_CPUS) =)

On Fri, Mar 26, 2004 at 04:06:34PM +1100, Keith Owens wrote:
> #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

Hmm, shouldn't that last one be ~0UL >> NR_CPUS_UNDEF?


-- wli
-
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.090 / U:1.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site