projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ath10k: add trace event for WMI_DEBUG_MESG_EVENTID
[cascardo/linux.git]
/
kernel
/
smp.c
diff --git
a/kernel/smp.c
b/kernel/smp.c
index
f5768b0
..
bd9f940
100644
(file)
--- a/
kernel/smp.c
+++ b/
kernel/smp.c
@@
-15,9
+15,9
@@
#include "smpboot.h"
#include "smpboot.h"
-#ifdef CONFIG_USE_GENERIC_SMP_HELPERS
enum {
CSD_FLAG_LOCK = 0x01,
enum {
CSD_FLAG_LOCK = 0x01,
+ CSD_FLAG_WAIT = 0x02,
};
struct call_function_data {
};
struct call_function_data {
@@
-124,7
+124,7
@@
static void csd_lock(struct call_single_data *csd)
static void csd_unlock(struct call_single_data *csd)
{
static void csd_unlock(struct call_single_data *csd)
{
- WARN_ON(!(csd->flags & CSD_FLAG_LOCK));
+ WARN_ON(
(csd->flags & CSD_FLAG_WAIT) &&
!(csd->flags & CSD_FLAG_LOCK));
/*
* ensure we're all done before releasing data:
/*
* ensure we're all done before releasing data:
@@
-139,13
+139,15
@@
static void csd_unlock(struct call_single_data *csd)
* for execution on the given CPU. data must already have
* ->func, ->info, and ->flags set.
*/
* for execution on the given CPU. data must already have
* ->func, ->info, and ->flags set.
*/
-static
-void generic_exec_single(int cpu, struct call_single_data *csd, int wait)
+static void generic_exec_single(int cpu, struct call_single_data *csd, int wait)
{
struct call_single_queue *dst = &per_cpu(call_single_queue, cpu);
unsigned long flags;
int ipi;
{
struct call_single_queue *dst = &per_cpu(call_single_queue, cpu);
unsigned long flags;
int ipi;
+ if (wait)
+ csd->flags |= CSD_FLAG_WAIT;
+
raw_spin_lock_irqsave(&dst->lock, flags);
ipi = list_empty(&dst->list);
list_add_tail(&csd->list, &dst->list);
raw_spin_lock_irqsave(&dst->lock, flags);
ipi = list_empty(&dst->list);
list_add_tail(&csd->list, &dst->list);
@@
-340,6
+342,7
@@
void __smp_call_function_single(int cpu, struct call_single_data *csd,
}
put_cpu();
}
}
put_cpu();
}
+EXPORT_SYMBOL_GPL(__smp_call_function_single);
/**
* smp_call_function_many(): Run a function on a set of other CPUs.
/**
* smp_call_function_many(): Run a function on a set of other CPUs.
@@
-459,7
+462,6
@@
int smp_call_function(smp_call_func_t func, void *info, int wait)
return 0;
}
EXPORT_SYMBOL(smp_call_function);
return 0;
}
EXPORT_SYMBOL(smp_call_function);
-#endif /* USE_GENERIC_SMP_HELPERS */
/* Setup configured maximum number of CPUs to activate */
unsigned int setup_max_cpus = NR_CPUS;
/* Setup configured maximum number of CPUs to activate */
unsigned int setup_max_cpus = NR_CPUS;