diff mbox

[v7,02/12] x86/Kconfig: Add config switch for CPU0 hotplug

Message ID 1345769771-27019-3-git-send-email-fenghua.yu@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Fenghua Yu Aug. 24, 2012, 12:56 a.m. UTC
From: Fenghua Yu <fenghua.yu@intel.com>

New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether
the CPU0 hotplug is on or off.

If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug
feature can still be turned on by kernel parameter cpu0_hotplug at boot.

If the switch is on, CPU0 is always hotpluggable. The default value of
the switch is off.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
 arch/x86/Kconfig |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

Comments

Borislav Petkov Aug. 24, 2012, 9:34 a.m. UTC | #1
On Thu, Aug 23, 2012 at 05:56:01PM -0700, Fenghua Yu wrote:
> From: Fenghua Yu <fenghua.yu@intel.com>
> 
> New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether
> the CPU0 hotplug is on or off.
> 
> If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug
> feature can still be turned on by kernel parameter cpu0_hotplug at boot.
> 
> If the switch is on, CPU0 is always hotpluggable. The default value of
> the switch is off.
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> ---
>  arch/x86/Kconfig |   29 +++++++++++++++++++++++++++++
>  1 files changed, 29 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 1d91dac..31c8b89 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1711,6 +1711,35 @@ config HOTPLUG_CPU
>  	    automatically on SMP systems. )
>  	  Say N if you want to disable CPU hotplug.
>  
> +config BOOTPARAM_HOTPLUG_CPU0
> +	bool "Set default setting of cpu0_hotpluggable"

Why not change this boot option into something more understandable like

	bool "BSP hotpluggable by default"

or similar?

And, btw, maybe I didn't catch this earlier, but why is in all
user-visible options the thing called "cpu0_*"? Wouldn't it be better to
call it "bsp_*"?

Thanks.
Fenghua Yu Aug. 24, 2012, 7:53 p.m. UTC | #2
> And, btw, maybe I didn't catch this earlier, but why is in all

> user-visible options the thing called "cpu0_*"? Wouldn't it be better

> to

> call it "bsp_*"?


The kernel parameter was called bsp_hotplug before. It was changed to cpu0_hotplug in v5 to keep uniform cpu0/CPU0 names.

Thanks.

-Fenghua
diff mbox

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1d91dac..31c8b89 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1711,6 +1711,35 @@  config HOTPLUG_CPU
 	    automatically on SMP systems. )
 	  Say N if you want to disable CPU hotplug.
 
+config BOOTPARAM_HOTPLUG_CPU0
+	bool "Set default setting of cpu0_hotpluggable"
+	default n
+	depends on HOTPLUG_CPU && EXPERIMENTAL
+	---help---
+	  Set whether default state of cpu0_hotpluggable is on or off.
+
+	  Say Y here to enable CPU0 hotplug by default. If this switch
+	  is turned on, there is no need to give cpu0_hotplug kernel
+	  parameter and the CPU0 hotplug feature is enabled by default.
+
+	  Please note: there are two known CPU0 dependencies if you want
+	  to enable the CPU0 hotplug feature either by this switch or by
+	  cpu0_hotplug kernel parameter.
+
+	  First, resume from hibernate or suspend always starts from CPU0.
+	  So hibernate and suspend are prevented if CPU0 is offline.
+
+	  Second dependency is PIC interrupts always go to CPU0. CPU0 can not
+	  offline if any interrupt can not migrate out of CPU0. There may
+	  be other CPU0 dependencies.
+
+	  Please make sure the dependencies are under your control before
+	  you enable this feature.
+
+	  Say N if you don't want to enable CPU0 hotplug feature by default.
+	  You still can enable the CPU0 hotplug feature at boot by kernel
+	  parameter cpu0_hotplug.
+
 config COMPAT_VDSO
 	def_bool y
 	prompt "Compat VDSO support"