[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/4] xen/arm: support for guest SGI
On Tue, 2013-04-23 at 13:08 +0100, Stefano Stabellini wrote: > On Tue, 23 Apr 2013, Ian Campbell wrote: > > > > > + cpumask_clear(&vcpu_mask); > > > > > + switch ( filter ) > > > > > + { > > > > > + case GICD_SGI_TARGET_LIST: > > > > > + cpumask_bits(&vcpu_mask)[0] = (*r & > > > > > GICD_SGI_TARGET_MASK) >> GICD_SGI_TARGET_SHIFT; > > > > > > > > Is this the best available way to set a cpumask in Xen? > > > > > > We could probably use cpumask_or to set the bits in vcpu_mask, but I > > > don't think it would be a great improvement. > > > > It would have the advantage of not breaking the cpumask abstraction > > quite so wide open though. > > Nope, I was wrong, cpumask_or only takes cpumask_t as arguments. In > fact the issue is that *r is not a cpumask_t, so the only way to make it > into a cpumask_t is to use cpumask_bits or a loop. Would a cpumask_from_bitmap(unsigned long *bm, int nr) helper be a generally useful thing to have? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |