Messages in this thread | | | Date | Sun, 23 Nov 2014 19:26:13 +0000 | From | Matt Fleming <> | Subject | Re: [PATCH] x86: Intel Cache Allocation Technology support |
| |
On Fri, 21 Nov, at 03:19:52PM, Thomas Gleixner wrote: > > + barrier(); > > + cqe_genable = true; > > What's the exact point of that barrier?
Yes, this definitely needs documenting. Vikas?
> > + > > +/* > > + * Tests if only contiguous bits are set. > > + */ > > + > > +static inline bool cbm_iscontiguous(unsigned long var) > > +{ > > This one here can be implemented with existing bitmap functions as > well.
Something like this?
first_bit = find_next_bit(map, nr_bits, -1); zero_bit = find_next_zero_bit(map, nr_bits, first_bit);
if (find_next_bit(map, nr_bits, zero_bit) < nr_bits) return -EINVAL; /* non-contiguous bits */
-- Matt Fleming, Intel Open Source Technology Center
| |