>>> On 01.04.17 at 15:53, <yi.y....@linux.intel.com> wrote:
> +static void do_write_psr_msr(void *data)
> +{
> +    struct cos_write_info *info = data;
> +    unsigned int cos            = info->cos;
> +    struct feat_node *feat      = info->feature;
> +
> +    if ( cos > feat->props->cos_max )
> +        return;

This check can as well be done in the caller, allowing to avoid the IPI
in case it's true.

> +    feat->props->write_msr(cos, info->val, feat);

Once the function consists of just this I wonder if it wasn't better
to invoke the hook directly from write_psr_msr().

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to