lkml.org 
[lkml]   [2004]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpumask 10/10 optimize various uses of new cpumasks
Rusty Russell wrote:
> On Fri, 2004-06-04 at 03:11, Paul Jackson wrote:
>
>>cpumask 10/10 optimize various uses of new cpumasks
>>
>> Make use of for_each_cpu_mask() macro to simplify and optimize
>> a couple of sparc64 per-CPU loops.
>
>
> This means we can finally do this, too... Yes!
>
> Name: Cleanup cpumask_t Temporaries
> Status: Booted on 2.6.7-rc2-bk4
> Depends: Misc/cpumask-tour-de-force.patch.gz
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>
> Paul Jackson's cpumask tour-de-force allows us to get rid of those
> stupid temporaries which we used to hold CPU_MASK_ALL to hand them to
> functions. This used to break NR_CPUS > BITS_PER_LONG.

Actually I think this was already possible as of a couple of
months ago, but thanks for doing the cleanup :)

Fix was embarrassingly simple as pointed out by Linus:

-#define CPU_MASK_ALL { {[0 ... CPU_ARRAY_SIZE-1] = ~0UL} }
-#define CPU_MASK_NONE { {[0 ... CPU_ARRAY_SIZE-1] = 0UL} }
+#define CPU_MASK_ALL ((cpumask_t) { {[0 ... CPU_ARRAY_SIZE-1] = ~0UL} })
+#define CPU_MASK_NONE ((cpumask_t) { {[0 ... CPU_ARRAY_SIZE-1] = 0UL} })
-
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:03    [W:0.109 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site