summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2006-06-27 02:54:10 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 17:32:41 -0700
commit39f4885c56073ecafd482d7e10dd7b17900fa312 (patch)
tree81a90a4b7bc4dae71613cce3e27da361b08ecb0a /include
parent26c2143b63b8078d08d562733716de142927e17a (diff)
[PATCH] cpu hotplug: add hotplug versions of cpu_notifier
Define new macros register_hotcpu_notifier() and unregister_hotcpu_notifier() that redefines register_cpu_notifier() and unregister_cpu_notifier() for use only when HOTPLUG_CPU is defined. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Cc: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index cdfe471a70a..a3caf6866ba 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -79,6 +79,8 @@ extern int lock_cpu_hotplug_interruptible(void);
{ .notifier_call = fn, .priority = pri }; \
register_cpu_notifier(&fn##_nb); \
}
+#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
+#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
int cpu_down(unsigned int cpu);
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
#else
@@ -86,6 +88,8 @@ int cpu_down(unsigned int cpu);
#define unlock_cpu_hotplug() do { } while (0)
#define lock_cpu_hotplug_interruptible() 0
#define hotcpu_notifier(fn, pri)
+#define register_hotcpu_notifier(nb)
+#define unregister_hotcpu_notifier(nb)
/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
static inline int cpu_is_offline(int cpu) { return 0; }