mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 02:21:15 +00:00
cpu: Remove try_get_online_cpus()
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. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
807226e2fb
commit
02ef3c4a2a
2 changed files with 0 additions and 15 deletions
|
@ -228,7 +228,6 @@ extern struct bus_type cpu_subsys;
|
||||||
extern void cpu_hotplug_begin(void);
|
extern void cpu_hotplug_begin(void);
|
||||||
extern void cpu_hotplug_done(void);
|
extern void cpu_hotplug_done(void);
|
||||||
extern void get_online_cpus(void);
|
extern void get_online_cpus(void);
|
||||||
extern bool try_get_online_cpus(void);
|
|
||||||
extern void put_online_cpus(void);
|
extern void put_online_cpus(void);
|
||||||
extern void cpu_hotplug_disable(void);
|
extern void cpu_hotplug_disable(void);
|
||||||
extern void cpu_hotplug_enable(void);
|
extern void cpu_hotplug_enable(void);
|
||||||
|
@ -246,7 +245,6 @@ int cpu_down(unsigned int cpu);
|
||||||
static inline void cpu_hotplug_begin(void) {}
|
static inline void cpu_hotplug_begin(void) {}
|
||||||
static inline void cpu_hotplug_done(void) {}
|
static inline void cpu_hotplug_done(void) {}
|
||||||
#define get_online_cpus() do { } while (0)
|
#define get_online_cpus() do { } while (0)
|
||||||
#define try_get_online_cpus() true
|
|
||||||
#define put_online_cpus() do { } while (0)
|
#define put_online_cpus() do { } while (0)
|
||||||
#define cpu_hotplug_disable() do { } while (0)
|
#define cpu_hotplug_disable() do { } while (0)
|
||||||
#define cpu_hotplug_enable() do { } while (0)
|
#define cpu_hotplug_enable() do { } while (0)
|
||||||
|
|
13
kernel/cpu.c
13
kernel/cpu.c
|
@ -102,19 +102,6 @@ void get_online_cpus(void)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(get_online_cpus);
|
EXPORT_SYMBOL_GPL(get_online_cpus);
|
||||||
|
|
||||||
bool try_get_online_cpus(void)
|
|
||||||
{
|
|
||||||
if (cpu_hotplug.active_writer == current)
|
|
||||||
return true;
|
|
||||||
if (!mutex_trylock(&cpu_hotplug.lock))
|
|
||||||
return false;
|
|
||||||
cpuhp_lock_acquire_tryread();
|
|
||||||
atomic_inc(&cpu_hotplug.refcount);
|
|
||||||
mutex_unlock(&cpu_hotplug.lock);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(try_get_online_cpus);
|
|
||||||
|
|
||||||
void put_online_cpus(void)
|
void put_online_cpus(void)
|
||||||
{
|
{
|
||||||
int refcount;
|
int refcount;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue