Now that synchronize_sched_expedited() no longer uses it, there are no users of try_get_online_cpus() in mainline. This commit therefore removes it.
Unified · Split
| @@ -228,7 +228,6 @@ extern struct bus_type cpu_subsys; · 227 unmodified lines | |||
| 228 | extern void cpu_hotplug_begin(void); | 228 | extern void cpu_hotplug_begin(void); |
| 229 | extern void cpu_hotplug_done(void); | 229 | extern void cpu_hotplug_done(void); |
| 230 | extern void get_online_cpus(void); | 230 | extern void get_online_cpus(void); |
| 231 | extern bool try_get_online_cpus(void); | ||
| 232 | extern void put_online_cpus(void); | 231 | extern void put_online_cpus(void); |
| 233 | extern void cpu_hotplug_disable(void); | 232 | extern void cpu_hotplug_disable(void); |
| 234 | extern void cpu_hotplug_enable(void); | 233 | extern void cpu_hotplug_enable(void); |
| @@ -246,7 +245,6 @@ int cpu_down(unsigned int cpu); · 11 unmodified lines | |||
| 246 | static inline void cpu_hotplug_begin(void) {} | 245 | static inline void cpu_hotplug_begin(void) {} |
| 247 | static inline void cpu_hotplug_done(void) {} | 246 | static inline void cpu_hotplug_done(void) {} |
| 248 | #define get_online_cpus() do { } while (0) | 247 | #define get_online_cpus() do { } while (0) |
| 249 | #define try_get_online_cpus() true | ||
| 250 | #define put_online_cpus() do { } while (0) | 248 | #define put_online_cpus() do { } while (0) |
| 251 | #define cpu_hotplug_disable() do { } while (0) | 249 | #define cpu_hotplug_disable() do { } while (0) |
| 252 | #define cpu_hotplug_enable() do { } while (0) | 250 | #define cpu_hotplug_enable() do { } while (0) |
| @@ -102,19 +102,6 @@ void get_online_cpus(void) · 101 unmodified lines | |||
| 102 | } | 102 | } |
| 103 | EXPORT_SYMBOL_GPL(get_online_cpus); | 103 | EXPORT_SYMBOL_GPL(get_online_cpus); |
| 104 | 104 | ||
| 105 | bool try_get_online_cpus(void) | ||
| 106 | { | ||
| 107 | if (cpu_hotplug.active_writer == current) | ||
| 108 | return true; | ||
| 109 | if (!mutex_trylock(&cpu_hotplug.lock)) | ||
| 110 | return false; | ||
| 111 | cpuhp_lock_acquire_tryread(); | ||
| 112 | atomic_inc(&cpu_hotplug.refcount); | ||
| 113 | mutex_unlock(&cpu_hotplug.lock); | ||
| 114 | return true; | ||
| 115 | } | ||
| 116 | EXPORT_SYMBOL_GPL(try_get_online_cpus); | ||
| 117 | |||
| 118 | void put_online_cpus(void) | 105 | void put_online_cpus(void) |
| 119 | { | 106 | { |
| 120 | int refcount; | 107 | int refcount; |