From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 3/4] tools/libxc: Alow getting and setting the max sub C-State Date: Wed, 18 Jun 2014 16:16:06 +0100 Message-ID: <53A1AD36.7090609@citrix.com> References: <1403103855-23080-1-git-send-email-ross.lagerwall@citrix.com> <1403103855-23080-4-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403103855-23080-4-git-send-email-ross.lagerwall@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Lagerwall Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Liu Jinsong , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich List-Id: xen-devel@lists.xenproject.org On 18/06/14 16:04, Ross Lagerwall wrote: > Signed-off-by: Ross Lagerwall > --- > 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