Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158149
b: refs/heads/master
c: 799e64f
h: refs/heads/master
i:
  158147: a6f2dba
v: v3
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Aug 15, 2009
1 parent 8e3b02f commit 9986e31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27569620c748ec13f801b4683b448a2ac2adaae4
refs/heads/master: 799e64f05f4bfaad2bb3165cab95c8c992a1c296
17 changes: 12 additions & 5 deletions trunk/include/linux/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ struct notifier_block;

#ifdef CONFIG_SMP
/* Need to know about CPUs going up/down? */
#if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE)
#define cpu_notifier(fn, pri) { \
static struct notifier_block fn##_nb __cpuinitdata = \
{ .notifier_call = fn, .priority = pri }; \
register_cpu_notifier(&fn##_nb); \
}
#else /* #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) */
#define cpu_notifier(fn, pri) do { (void)(fn); } while (0)
#endif /* #else #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) */
#ifdef CONFIG_HOTPLUG_CPU
extern int register_cpu_notifier(struct notifier_block *nb);
extern void unregister_cpu_notifier(struct notifier_block *nb);
Expand All @@ -74,6 +83,8 @@ extern void cpu_maps_update_done(void);

#else /* CONFIG_SMP */

#define cpu_notifier(fn, pri) do { (void)(fn); } while (0)

static inline int register_cpu_notifier(struct notifier_block *nb)
{
return 0;
Expand All @@ -99,11 +110,7 @@ extern struct sysdev_class cpu_sysdev_class;

extern void get_online_cpus(void);
extern void put_online_cpus(void);
#define hotcpu_notifier(fn, pri) { \
static struct notifier_block fn##_nb __cpuinitdata = \
{ .notifier_call = fn, .priority = pri }; \
register_cpu_notifier(&fn##_nb); \
}
#define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri)
#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
int cpu_down(unsigned int cpu);
Expand Down

0 comments on commit 9986e31

Please sign in to comment.