From: Rusty Russell <rusty@rustcorp.com.au>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, Mike Travis <travis@sgi.com>
Cc: Mike Travis <travis@sgi.com>
Subject: [PATCH 2/2] cpumask: Use smp_call_function_many(): arm
Date: Sun, 7 Dec 2008 21:50:07 +1030 [thread overview]
Message-ID: <200812072150.15846.rusty@rustcorp.com.au> (raw)
[-- 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¥
reply other threads:[~2008-12-07 11:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200812072150.15846.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=travis@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.