[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/4] tools/libxc: Alow getting and setting the max sub C-State



On 18/06/14 16:04, Ross Lagerwall wrote:
> Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> ---
>  tools/libxc/xc_pm.c         | 33 +++++++++++++++++++++++++++++++++
>  tools/libxc/xenctrl.h       |  3 +++
>  xen/drivers/acpi/pmstat.c   | 12 ++++++++++++
>  xen/include/public/sysctl.h |  6 ++++++
>  xen/include/xen/acpi.h      | 20 ++++++++++++++++++++
>  5 files changed, 74 insertions(+)
>
>
> diff --git a/xen/include/xen/acpi.h b/xen/include/xen/acpi.h
> index b49c4fc..52e9074 100644
> --- a/xen/include/xen/acpi.h
> +++ b/xen/include/xen/acpi.h
> @@ -141,10 +141,30 @@ static inline void acpi_set_cstate_limit(unsigned int 
> new_limit)
>       return;
>  }
>  
> +/*
> + * Set the highest legal sub C-state. Only applies to the highest legal 
> C-state
> + * max_cstate = 1, max_substate = 0 ==> C0, C1 okay, but not C1E
> + * max_cstate = 1, max_substate = 1 ==> C0, C1 and C1E okay, but not C2
> + * max_cstate = 2, max_substate = 0 ==> C0, C1, C1E, C2 okay, but not C3
> + * max_cstate = 2, max_substate = 1 ==> C0, C1, C1E, C2 okay, but not C3
> + */
> +

This comment belongs in the previous patch.

>  extern unsigned int max_substate;
> +
> +static inline unsigned int acpi_get_substate_limit(void)
> +{
> +     return max_substate;
> +}

Newline in here please.

> +static inline void acpi_set_substate_limit(unsigned int new_limit)
> +{
> +     max_substate = new_limit;
> +     return;

Drop this return.

> +}

And a newline here please.

>  #else
>  static inline unsigned int acpi_get_cstate_limit(void) { return 0; }
>  static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; }
> +static inline unsigned int acpi_get_substate_limit(void) { return 0; }
> +static inline void acpi_set_substate_limit(unsigned int new_limit) { return; 
> }
>  #endif
>  
>  #ifdef XEN_GUEST_HANDLE_PARAM


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.