diff --git a/include/linux/smp.h b/include/linux/smp.h index e21278d66a4b..b0de11140ee3 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -101,6 +101,8 @@ extern void smp_cpus_done(unsigned int max_cpus); /* * Call a function on all other processors */ +int generic_exec_single(int cpu, struct __call_single_data *csd, + smp_call_func_t func, void *info); void smp_call_function(smp_call_func_t func, void *info, int wait); void smp_call_function_many(const struct cpumask *mask, smp_call_func_t func, void *info, bool wait); diff --git a/kernel/smp.c b/kernel/smp.c index 767a156b1bd2..67d671709b9e 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -128,7 +128,8 @@ static __always_inline void csd_lock(call_single_data_t *csd) static __always_inline void csd_unlock(call_single_data_t *csd) { - WARN_ON(!(csd->flags & CSD_FLAG_LOCK)); + if (!(csd->flags & CSD_FLAG_LOCK)) + return; /* * ensure we're all done before releasing data: @@ -145,7 +146,7 @@ extern void send_call_function_single_ipi(int cpu); * for execution on the given CPU. data must already have * ->func, ->info, and ->flags set. */ -static int generic_exec_single(int cpu, call_single_data_t *csd, +int generic_exec_single(int cpu, call_single_data_t *csd, smp_call_func_t func, void *info) { if (cpu == smp_processor_id()) {