From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752600AbbFXJyT (ORCPT ); Wed, 24 Jun 2015 05:54:19 -0400 Received: from www.linutronix.de ([62.245.132.108]:43980 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751874AbbFXJyP (ORCPT ); Wed, 24 Jun 2015 05:54:15 -0400 Date: Wed, 24 Jun 2015 11:54:05 +0200 (CEST) From: Thomas Gleixner To: Vitaly Kuznetsov cc: Peter Zijlstra , KY Srinivasan , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "mingo@kernel.org" , "rafael.j.wysocki@intel.com" Subject: Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable In-Reply-To: <87twtx786y.fsf@vitty.brq.redhat.com> Message-ID: References: <1434941760-16858-1-git-send-email-kys@microsoft.com> <20150623181310.GG3644@twins.programming.kicks-ass.net> <87twtx786y.fsf@vitty.brq.redhat.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Jun 2015, Vitaly Kuznetsov wrote: > Peter Zijlstra writes: > > > 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. > > > > Yes, but these bugs are not in Linux. I don't see any other way for a > platform to enable/disable cpu hotplug in runtime. What? cpu_hotplug_disable()/enable() do that today. They just do not support recursion and we have not yet seen any argument WHY that's required at all. Thanks, tglx