aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2013-02-13 15:03:34 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2013-02-13 15:03:58 +0700
commit5f9dde0757e557d16685d29b21a6055025ec252e (patch)
tree5f34dae1bcf94f1865c18ba9aced566abeb855b7 /kernel
parent6b5ed324376aa451c3a51e367148da41c21ae36a (diff)
parenta96dbfbcb58afeec72c2a0a03d205e0e1457ea3d (diff)
downloadkernel_samsung_aries-5f9dde0757e557d16685d29b21a6055025ec252e.zip
kernel_samsung_aries-5f9dde0757e557d16685d29b21a6055025ec252e.tar.gz
kernel_samsung_aries-5f9dde0757e557d16685d29b21a6055025ec252e.tar.bz2
Merge 3.0.63
Change-Id: I9a9716dcb833c128a649864690169473ec4739e1
Diffstat (limited to 'kernel')
-rw-r--r--kernel/smp.c13
-rw-r--r--kernel/trace/ftrace.c2
2 files changed, 13 insertions, 2 deletions
diff --git a/kernel/smp.c b/kernel/smp.c
index fb67dfa..38d9e03 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -31,6 +31,7 @@ struct call_function_data {
struct call_single_data csd;
atomic_t refs;
cpumask_var_t cpumask;
+ cpumask_var_t cpumask_ipi;
};
static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_function_data, cfd_data);
@@ -54,6 +55,9 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
if (!zalloc_cpumask_var_node(&cfd->cpumask, GFP_KERNEL,
cpu_to_node(cpu)))
return notifier_from_errno(-ENOMEM);
+ if (!zalloc_cpumask_var_node(&cfd->cpumask_ipi, GFP_KERNEL,
+ cpu_to_node(cpu)))
+ return notifier_from_errno(-ENOMEM);
break;
#ifdef CONFIG_HOTPLUG_CPU
@@ -63,6 +67,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
case CPU_DEAD:
case CPU_DEAD_FROZEN:
free_cpumask_var(cfd->cpumask);
+ free_cpumask_var(cfd->cpumask_ipi);
break;
#endif
};
@@ -524,6 +529,12 @@ void smp_call_function_many(const struct cpumask *mask,
return;
}
+ /*
+ * After we put an entry into the list, data->cpumask
+ * may be cleared again when another CPU sends another IPI for
+ * a SMP function call, so data->cpumask will be zero.
+ */
+ cpumask_copy(data->cpumask_ipi, data->cpumask);
raw_spin_lock_irqsave(&call_function.lock, flags);
/*
* Place entry at the _HEAD_ of the list, so that any cpu still
@@ -547,7 +558,7 @@ void smp_call_function_many(const struct cpumask *mask,
smp_mb();
/* Send a message to all CPUs in the map */
- arch_send_call_function_ipi_mask(data->cpumask);
+ arch_send_call_function_ipi_mask(data->cpumask_ipi);
/* Optionally wait for the CPUs to complete */
if (wait)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f88ea18..e96eee3 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3460,7 +3460,7 @@ static int ftrace_module_notify(struct notifier_block *self,
struct notifier_block ftrace_module_nb = {
.notifier_call = ftrace_module_notify,
- .priority = 0,
+ .priority = INT_MAX, /* Run before anything that can use kprobes */
};
extern unsigned long __start_mcount_loc[];