lkml.org 
[lkml]   [2014]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2014-11-23 21:01    [W:0.394 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site