Messages in this thread Patch in this message | | | Subject | Re: [Patch 6/23] mask v2 - Replace cpumask_t with one using mask | From | Matthew Dobson <> | Date | Fri, 02 Apr 2004 14:24:36 -0800 |
| |
On Thu, 2004-04-01 at 13:11, Paul Jackson wrote: > Patch_6_of_23 - Rework cpumasks to use new mask ADT > Removes many old include/asm-<arch> and asm-generic cpumask files > Add intersects, subset, xor and andnot operators. > Provides temporary emulators for obsolete const, promote, coerce > Presents entire cpumask API clearly in single cpumask.h file
<snip>
> +#else /* !CONFIG_SMP */ > + > +#define cpu_online_map cpumask_of_cpu(0) > +#define cpu_possible_map cpumask_of_cpu(0)
I mentioned earlier that there's probably a better way to do this for UP... What do you think about this?
-Matt diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.4-pj_mask_v2/include/linux/cpumask.h linux-2.6.4-UP_online_map/include/linux/cpumask.h --- linux-2.6.4-pj_mask_v2/include/linux/cpumask.h Fri Apr 2 14:03:21 2004 +++ linux-2.6.4-UP_online_map/include/linux/cpumask.h Fri Apr 2 14:13:54 2004 @@ -134,8 +134,12 @@ extern cpumask_t cpu_possible_map; #else /* !CONFIG_SMP */ -#define cpu_online_map cpumask_of_cpu(0) -#define cpu_possible_map cpumask_of_cpu(0) +#define cpu_online_map \ +({ \ + cpumask_t m = MASK_ALL1(NR_CPUS); \ + m; \ +}) +#define cpu_possible_map cpu_online_map #define num_online_cpus() 1 #define num_possible_cpus() 1 | |