summaryrefslogtreecommitdiff
path: root/arch/ia64/kernel/smp.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2011-01-07 09:17:33 -0800
committerTony Luck <tony.luck@intel.com>2011-01-07 09:17:33 -0800
commit4bfc2b2eccf48fef84b9adfe4f1bd8d5e6e1bc8d (patch)
tree88b0d60b5a6dd1c4465aa7bffd71585a6ebad6c0 /arch/ia64/kernel/smp.c
parent01539ba2a706ab7d35fc0667dff919ade7f87d63 (diff)
parent05f2f274c8a8747bbfb13ac8ee0c27d5f2ad8510 (diff)
Pull misc2.6.38 into release branch
Diffstat (limited to 'arch/ia64/kernel/smp.c')
-rw-r--r--arch/ia64/kernel/smp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index dabeefe21134..be450a3e9871 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -293,6 +293,7 @@ smp_flush_tlb_all (void)
void
smp_flush_tlb_mm (struct mm_struct *mm)
{
+ cpumask_var_t cpus;
preempt_disable();
/* this happens for the common case of a single-threaded fork(): */
if (likely(mm == current->active_mm && atomic_read(&mm->mm_users) == 1))
@@ -301,9 +302,15 @@ smp_flush_tlb_mm (struct mm_struct *mm)
preempt_enable();
return;
}
-
- smp_call_function_many(mm_cpumask(mm),
- (void (*)(void *))local_finish_flush_tlb_mm, mm, 1);
+ if (!alloc_cpumask_var(&cpus, GFP_ATOMIC)) {
+ smp_call_function((void (*)(void *))local_finish_flush_tlb_mm,
+ mm, 1);
+ } else {
+ cpumask_copy(cpus, mm_cpumask(mm));
+ smp_call_function_many(cpus,
+ (void (*)(void *))local_finish_flush_tlb_mm, mm, 1);
+ free_cpumask_var(cpus);
+ }
local_irq_disable();
local_finish_flush_tlb_mm(mm);
local_irq_enable();