xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/arm: Fix smp_send_call_function_mask() for current CPU
@ 2014-08-14 11:47 Anup Patel
  2014-08-14 11:49 ` Anup Patel
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Anup Patel @ 2014-08-14 11:47 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Campbell, Anup Patel, stefano.stabellini, julien.grall,
	stefano.stabellini, Pranavkumar Sawargaonkar

The smp_send_call_function_mask() does not work on Foundation v8
model with one CPU. The reason being gicv2_send_SGI() is called
with irqmode==SGI_TARGET_LIST and *cpu_mask=0x1 on CPU0 which
does not work on Foundation v8 model.

Further, it is really strange that smp_send_call_function_mask()
depends on GIC SGIs for calling function on current CPU.

This patch fixes smp_send_call_function_mask() for current CPU
by directly calling smp_call_function_interrupt() on current CPU.
This is very similar to what Xen x86 does.

Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
---
 xen/arch/arm/smp.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xen/arch/arm/smp.c b/xen/arch/arm/smp.c
index 30203b8..4fde3f9 100644
--- a/xen/arch/arm/smp.c
+++ b/xen/arch/arm/smp.c
@@ -20,6 +20,13 @@ 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);
+
+    if ( cpumask_test_cpu(smp_processor_id(), mask) )
+    {
+        local_irq_disable();
+        smp_call_function_interrupt();
+        local_irq_enable();
+    }
 }
 
 /*
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-15 10:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-14 11:47 [PATCH] xen/arm: Fix smp_send_call_function_mask() for current CPU Anup Patel
2014-08-14 11:49 ` Anup Patel
2014-08-14 12:44 ` Julien Grall
2014-08-14 21:52   ` Julien Grall
2014-08-15  3:58   ` Anup Patel
2014-08-15  9:28 ` Stefano Stabellini
2014-08-15 10:12   ` Anup Patel

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).