[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v10 12/25] x86: refactor psr: L3 CAT: set value: implement cos id picking flow.
>>> On 01.04.17 at 15:53, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: > --- a/xen/arch/x86/psr.c > +++ b/xen/arch/x86/psr.c > @@ -800,15 +800,82 @@ static int find_cos(const uint32_t val[], unsigned int > array_len, > return -ENOENT; > } > > +static bool fits_cos_max(const uint32_t val[], > + uint32_t array_len, > + const struct psr_socket_info *info, > + unsigned int cos) > +{ > + unsigned int i; > + > + for ( i = 0; i < PSR_SOCKET_MAX_FEAT; i++ ) > + { > + uint32_t default_val = 0; Move this into the most narrow scope it's needed in, which will make pretty clear that the initializer again isn't needed. > + const struct feat_node *feat = info->features[i]; > + if ( !feat ) > + continue; > + > + if ( array_len < feat->props->cos_num ) > + return false; > + > + if ( cos > feat->props->cos_max ) > + { > + feat->props->get_val(feat, 0, &default_val); > + if ( val[0] != default_val ) Same question as before. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |