[PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

Peter Zijlstra peterz at infradead.org
Tue Jun 23 18:13:10 UTC 2015


On Tue, Jun 23, 2015 at 04:57:05PM +0000, KY Srinivasan wrote:

> > diff --git a/kernel/cpu.c b/kernel/cpu.c
> > index 94bbe46..8f35ee6 100644
> > --- a/kernel/cpu.c
> > +++ b/kernel/cpu.c
> > @@ -190,17 +190,19 @@ void cpu_hotplug_done(void)
> >  void cpu_hotplug_disable(void)
> >  {
> >  	cpu_maps_update_begin();
> > -	cpu_hotplug_disabled = 1;
> > +	cpu_hotplug_disabled++;
> >  	cpu_maps_update_done();
> >  }
> > +EXPORT_SYMBOL_GPL(cpu_hotplug_disable);
> > 
> >  void cpu_hotplug_enable(void)
> >  {
> >  	cpu_maps_update_begin();
> > -	cpu_hotplug_disabled = 0;
> > +	if (cpu_hotplug_disabled)
> > +		cpu_hotplug_disabled--;

No that just papers over bugs.

> >  	cpu_maps_update_done();
> >  }


More information about the devel mailing list