Skip to content

Commit

Permalink
[PATCH] i386: avoid checking for cpu gone when CONFIG_HOTPLUG_CPU not…
Browse files Browse the repository at this point in the history
… defined

Avoid checking for cpu gone in mm hot path when CONFIG_HOTPLUG_CPU is not
defined.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Keshavamurthy, Anil S authored and Andi Kleen committed May 2, 2007
1 parent 141a892 commit e8a72ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/i386/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,
BUG_ON(cpu_isset(smp_processor_id(), cpumask));
BUG_ON(!mm);

#ifdef CONFIG_HOTPLUG_CPU
/* If a CPU which we ran on has gone down, OK. */
cpus_and(cpumask, cpumask, cpu_online_map);
if (cpus_empty(cpumask))
if (unlikely(cpus_empty(cpumask)))
return;
#endif

/*
* i'm not happy about this global shared spinlock in the
Expand Down

0 comments on commit e8a72ff

Please sign in to comment.