aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/cpu.h4
-rw-r--r--include/linux/cpumask.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index b79c57569367..92f2029a34f3 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -107,7 +107,6 @@ extern void unlock_cpu_hotplug(void);
107#define register_hotcpu_notifier(nb) register_cpu_notifier(nb) 107#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
108#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) 108#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
109int cpu_down(unsigned int cpu); 109int cpu_down(unsigned int cpu);
110#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
111 110
112#else /* CONFIG_HOTPLUG_CPU */ 111#else /* CONFIG_HOTPLUG_CPU */
113 112
@@ -122,9 +121,6 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)
122/* These aren't inline functions due to a GCC bug. */ 121/* These aren't inline functions due to a GCC bug. */
123#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) 122#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; })
124#define unregister_hotcpu_notifier(nb) ({ (void)(nb); }) 123#define unregister_hotcpu_notifier(nb) ({ (void)(nb); })
125
126/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
127static inline int cpu_is_offline(int cpu) { return 0; }
128#endif /* CONFIG_HOTPLUG_CPU */ 124#endif /* CONFIG_HOTPLUG_CPU */
129 125
130#ifdef CONFIG_PM_SLEEP_SMP 126#ifdef CONFIG_PM_SLEEP_SMP
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 23f55140ccd5..85bd790c201e 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -397,6 +397,8 @@ extern cpumask_t cpu_present_map;
397#define cpu_present(cpu) ((cpu) == 0) 397#define cpu_present(cpu) ((cpu) == 0)
398#endif 398#endif
399 399
400#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
401
400#ifdef CONFIG_SMP 402#ifdef CONFIG_SMP
401extern int nr_cpu_ids; 403extern int nr_cpu_ids;
402#define any_online_cpu(mask) __any_online_cpu(&(mask)) 404#define any_online_cpu(mask) __any_online_cpu(&(mask))