[PATCH] x86, smpboot: use zalloc_cpumask_var instead of alloc/clear

From: Andreas Herrmann
Date: Thu Aug 06 2009 - 13:45:50 EST


On Thu, Aug 06, 2009 at 06:15:52PM +0200, Andreas Herrmann wrote:
> On Thu, Aug 06, 2009 at 06:30:46PM +1000, Stephen Rothwell wrote:
> > Hi Andrea,
> >
> > On Wed, 5 Aug 2009 17:48:11 +0200 Andreas Herrmann <andreas.herrmann3@xxxxxxx> wrote:
> > >
> > > @@ -1061,8 +1070,10 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
> > > for_each_possible_cpu(i) {
> > > alloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
> > > alloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
> > > + alloc_cpumask_var(&per_cpu(cpu_node_map, i), GFP_KERNEL);
> > > alloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL);
> > > cpumask_clear(per_cpu(cpu_core_map, i));
> > > + cpumask_clear(per_cpu(cpu_node_map, i));
> >
> > I noticed this in linux-next ... you can use zalloc_cpumask_var() instead
> > of alloc_cpumask_var() followed by cpumask_clear().
>
> I know, there is a collision with a patch in linux-next that replaced
> alloc_cpumask_var/cpumask_clear with the zalloc version.
>
> (a) Either that patch should be adapted to change also the new allocation.
> (b) I can also change all those allocation to zalloc with my patch.
>
> Make your choice:
>
> [ ] (a)
> [ ] (b)


My choice is
[X] (c) Do this in a separate patch.

See below.

Regards,
Andreas

--