From: Anup Patel <anup.patel@linaro.org>
To: xen-devel@lists.xen.org
Cc: Ian.Campbell@citrix.com, Anup Patel <anup.patel@linaro.org>,
stefano.stabellini@eu.citrix.com, julien.grall@linaro.org,
patches@apm.com, stefano.stabellini@citrix.com,
Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Subject: [PATCH] xen/arm: minor improvement in smp_send_call_function_mask()
Date: Tue, 19 Aug 2014 10:18:24 +0530 [thread overview]
Message-ID: <1408423704-15059-1-git-send-email-anup.patel@linaro.org> (raw)
Currently, smp_send_call_function_mask() function implemented
by xen arm/arm64 will use IPI to call function on current CPU.
This means that current smp_send_call_function_mask() will do
the following on current CPU:
Trigger SGI for current CPU => Xen takes interrupt on current CPU
=> IPI interrupt handler will call smp_call_function_interrupt()
This patch improves the above by straight away calling
smp_call_function_interrupt() for current CPU. This is very
similar to smp_send_call_function_mask() implemented by Xen x86.
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
---
xen/arch/arm/smp.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/smp.c b/xen/arch/arm/smp.c
index 30203b8..c80c068 100644
--- a/xen/arch/arm/smp.c
+++ b/xen/arch/arm/smp.c
@@ -19,7 +19,19 @@ void smp_send_event_check_mask(const cpumask_t *mask)
void smp_send_call_function_mask(const cpumask_t *mask)
{
- send_SGI_mask(mask, GIC_SGI_CALL_FUNCTION);
+ cpumask_t target_mask;
+
+ cpumask_andnot(&target_mask, mask, cpumask_of(smp_processor_id()));
+
+ if ( cpumask_weight(&target_mask) )
+ send_SGI_mask(&target_mask, GIC_SGI_CALL_FUNCTION);
+
+ if ( cpumask_test_cpu(smp_processor_id(), mask) )
+ {
+ local_irq_disable();
+ smp_call_function_interrupt();
+ local_irq_enable();
+ }
}
/*
--
1.7.9.5
next reply other threads:[~2014-08-19 4:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 4:48 Anup Patel [this message]
2014-08-19 21:06 ` [PATCH] xen/arm: minor improvement in smp_send_call_function_mask() Julien Grall
2014-08-20 6:14 ` Anup Patel
2014-08-20 15:07 ` Julien Grall
2014-08-21 11:04 ` Anup Patel
2014-08-21 16:54 ` Julien Grall
2014-08-21 17:22 ` Andrew Cooper
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=1408423704-15059-1-git-send-email-anup.patel@linaro.org \
--to=anup.patel@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=patches@apm.com \
--cc=pranavkumar@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).