projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'x86/iommu' into x86/core
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
smp.c
diff --git
a/kernel/smp.c
b/kernel/smp.c
index f362a85537777619d1ef22602042fba351a75e7d..75c8dde58c55fcdd2f0ae71f75ceb05213e0985e 100644
(file)
--- a/
kernel/smp.c
+++ b/
kernel/smp.c
@@
-51,10
+51,6
@@
static void csd_flag_wait(struct call_single_data *data)
{
/* Wait for response */
do {
{
/* Wait for response */
do {
- /*
- * We need to see the flags store in the IPI handler
- */
- smp_mb();
if (!(data->flags & CSD_FLAG_WAIT))
break;
cpu_relax();
if (!(data->flags & CSD_FLAG_WAIT))
break;
cpu_relax();
@@
-76,6
+72,11
@@
static void generic_exec_single(int cpu, struct call_single_data *data)
list_add_tail(&data->list, &dst->list);
spin_unlock_irqrestore(&dst->lock, flags);
list_add_tail(&data->list, &dst->list);
spin_unlock_irqrestore(&dst->lock, flags);
+ /*
+ * Make the list addition visible before sending the ipi.
+ */
+ smp_mb();
+
if (ipi)
arch_send_call_function_single_ipi(cpu);
if (ipi)
arch_send_call_function_single_ipi(cpu);
@@
-157,7
+158,7
@@
void generic_smp_call_function_single_interrupt(void)
* Need to see other stores to list head for checking whether
* list is empty without holding q->lock
*/
* Need to see other stores to list head for checking whether
* list is empty without holding q->lock
*/
- smp_
mb
();
+ smp_
read_barrier_depends
();
while (!list_empty(&q->list)) {
unsigned int data_flags;
while (!list_empty(&q->list)) {
unsigned int data_flags;
@@
-191,7
+192,7
@@
void generic_smp_call_function_single_interrupt(void)
/*
* See comment on outer loop
*/
/*
* See comment on outer loop
*/
- smp_
mb
();
+ smp_
read_barrier_depends
();
}
}
}
}
@@
-370,6
+371,11
@@
int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
list_add_tail_rcu(&data->csd.list, &call_function_queue);
spin_unlock_irqrestore(&call_function_lock, flags);
list_add_tail_rcu(&data->csd.list, &call_function_queue);
spin_unlock_irqrestore(&call_function_lock, flags);
+ /*
+ * Make the list addition visible before sending the ipi.
+ */
+ smp_mb();
+
/* Send a message to all CPUs in the map */
arch_send_call_function_ipi(mask);
/* Send a message to all CPUs in the map */
arch_send_call_function_ipi(mask);