All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Liu Jinsong <jinsong.liu@alibaba-inc.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org, Jan Beulich <jbeulich@suse.com>
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	[thread overview]
Message-ID: <53A1AD36.7090609@citrix.com> (raw)
In-Reply-To: <1403103855-23080-4-git-send-email-ross.lagerwall@citrix.com>

On 18/06/14 16:04, Ross Lagerwall wrote:
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> ---
>  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

  reply	other threads:[~2014-06-18 15:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 15:04 [PATCH 0/4] Support controlling the maximum sub C-State Ross Lagerwall
2014-06-18 15:04 ` [PATCH 1/4] x86/mwait_idle: Fix trace output Ross Lagerwall
2014-06-18 15:04 ` [PATCH 2/4] x86/mwait_idle: Allow limiting the sub C-state Ross Lagerwall
2014-06-18 15:23   ` Andrew Cooper
2014-06-18 15:51   ` Jan Beulich
2014-06-18 15:04 ` [PATCH 3/4] tools/libxc: Alow getting and setting the max sub C-State Ross Lagerwall
2014-06-18 15:16   ` Andrew Cooper [this message]
2014-06-18 16:00   ` Jan Beulich
2014-06-18 15:04 ` [PATCH 4/4] xenpm: " Ross Lagerwall
2014-06-18 15:28   ` Andrew Cooper
2014-06-18 15:16 ` [PATCH 0/4] Support controlling the maximum " Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A1AD36.7090609@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=keir@xen.org \
    --cc=ross.lagerwall@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.