public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] cpumask: Use smp_call_function_many(): arm
@ 2008-12-07 11:20 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2008-12-07 11:20 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel, Mike Travis, Mike Travis

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 2513 bytes --]

Change smp_call_function_mask() callers to smp_call_function_many().
I chose to make on_each_cpu_mask() take a cpumask pointer; for the smallcpumasks on arm this is probably a slight pessimization, but it setsa good example for generic code which is being weaned off on-stackcpumasks.  I can simplify this patch further if you wish.
Compile-tested only.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>Signed-off-by: Mike Travis <travis@sgi.com>--- arch/arm/kernel/smp.c |   23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-)
--- linux-2.6.orig/arch/arm/kernel/smp.c+++ linux-2.6/arch/arm/kernel/smp.c@@ -526,20 +526,17 @@ int setup_profiling_timer(unsigned int m 	return -EINVAL; } -static int-on_each_cpu_mask(void (*func)(void *), void *info, int wait, cpumask_t mask)+static void+on_each_cpu_mask(void (*func)(void *), void *info, int wait,+		 const struct cpumask *mask) {-	int ret = 0;- 	preempt_disable(); -	ret = smp_call_function_mask(mask, func, info, wait);-	if (cpu_isset(smp_processor_id(), mask))+	smp_call_function_many(mask, func, info, wait);+	if (cpumask_test_cpu(smp_processor_id(), mask)) 		func(info);  	preempt_enable();--	return ret; }  /**********************************************************************/@@ -600,20 +597,17 @@ void flush_tlb_all(void)  void flush_tlb_mm(struct mm_struct *mm) {-	cpumask_t mask = mm->cpu_vm_mask;--	on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mask);+	on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, &mm->cpu_vm_mask); }  void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) {-	cpumask_t mask = vma->vm_mm->cpu_vm_mask; 	struct tlb_args ta;  	ta.ta_vma = vma; 	ta.ta_start = uaddr; -	on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mask);+	on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, &vma->vm_mm->cpu_vm_mask); }  void flush_tlb_kernel_page(unsigned long kaddr)@@ -628,14 +622,13 @@ void flush_tlb_kernel_page(unsigned long void flush_tlb_range(struct vm_area_struct *vma,                      unsigned long start, unsigned long end) {-	cpumask_t mask = vma->vm_mm->cpu_vm_mask; 	struct tlb_args ta;  	ta.ta_vma = vma; 	ta.ta_start = start; 	ta.ta_end = end; -	on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mask);+	on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, &vma->vm_mm->cpu_vm_mask); }  void flush_tlb_kernel_range(unsigned long start, unsigned long end)\0ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-07 11:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-07 11:20 [PATCH 2/2] cpumask: Use smp_call_function_many(): arm Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox