|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 03/13] x86: maintain COS to CBM mapping for each socket
>>> On 03.06.15 at 06:53, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
> @@ -209,6 +215,23 @@ void psr_ctxt_switch_to(struct domain *d)
> }
> }
>
> +static int cat_cpu_prepare(unsigned int cpu)
> +{
> + struct psr_cat_socket_info *info;
> +
> + if ( !cat_socket_info )
> + return 0;
> +
> + info = cat_socket_info + cpu_to_socket(cpu);
Is cpu_to_socket() guaranteed to always return a value < nr_sockets?
> + if ( info->cos_to_cbm )
> + return 0;
> + else
> + {
> + info->cos_to_cbm = xzalloc_array(struct psr_cat_cbm, opt_cos_max +
> 1UL);
> + return info->cos_to_cbm ? 0 : -ENOMEM;
> + }
Please drop the pointless "else" here.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |