[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/arm: minor improvement in smp_send_call_function_mask()

Hi Anup,

On 18/08/14 23:48, Anup Patel wrote:
  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) )

Is it necessary? What happen if Xen tries to send an SGI with an empty mask?

AFAIU, the function cpumask_weight is complex so if we can avoid it, it would be better.

Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.