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

Re: [Xen-devel] [PATCH v5 03/21] xen/arm: make sgi handling generic

On Thu, 2014-06-12 at 19:06 +0530, vijay.kilari@xxxxxxxxx wrote:
>  void send_SGI_allbutself(enum gic_sgi sgi)
>  {
> +   cpumask_t all_others_mask;
>     ASSERT(sgi < 16); /* There are only 16 SGIs */
> +   cpumask_andnot(&all_others_mask, &cpu_possible_map, 
> cpumask_of(smp_processor_id()));
>     dsb(sy);
> -       | sgi;
> +   send_SGI(&all_others_mask, sgi, SGI_TARGET_OTHERS);

What is all_others_mask for here? send_sgi doesn't reference that
argument when SGI_TARGET_OTHERS is used.

Ah, I see Stefano asked in v4 and you explained (hint: when someone has
to ask it often indicates that it is worth explaining in the commit
message next time around). You said:
        In GICv2 the mask is not used in some cases. However mask value
        is used in GICv3. To make it generic mask value is always
I think the right answer here is for the gicv3 implementation of
send_SGI to calculate the mask for SGI_TARGET_OTHERS and SGI_TARGET_SELF

I'd also be inclined to put the mask as the last argument, i..e 
        static void send_SGI(enum gic_sgi sgi,
                             enum gic_sgi_mode irqmode,
                             const cpumask_t *cpu_mask)

That seems like a more natural argument order to me. (i.e. what, where
to, more detailed target when required).


Xen-devel mailing list



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