lkml.org 
[lkml]   [2011]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 8/8] kernel/cpu.c: Define bsp_hotpluggable variable
Date
From: Fenghua Yu <fenghua.yu@intel.com>

This gloable variable controls BSP (aka CPU0) hotplug. If set, BSP is
hotpluggable. By default, it's 0. On X86, kernel option bsp_hotpluggable sets
the variable as 1.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
include/linux/cpu.h | 2 ++
kernel/cpu.c | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index b1a635a..1b0b1ad 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -172,6 +172,8 @@ extern void put_online_cpus(void);
#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
int cpu_down(unsigned int cpu);

+extern int bsp_hotpluggable;
+
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
extern void cpu_hotplug_driver_lock(void);
extern void cpu_hotplug_driver_unlock(void);
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 12b7458..65d1a13 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -43,6 +43,11 @@ static int cpu_hotplug_disabled;

#ifdef CONFIG_HOTPLUG_CPU

+/*
+ * If set, BSP (aka CPU0) can be onlined/offlined. By default, it's not set.
+ */
+int bsp_hotpluggable;
+
static struct {
struct task_struct *active_writer;
struct mutex lock; /* Synchronizes accesses to refcount, */
--
1.6.0.3


\
 
 \ /
  Last update: 2011-10-05 18:59    [from the cache]
©2003-2011 Jasper Spaans