Linux ACPI
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI: processor: allowing probing on platforms with one ACPI C-state
Date: Sun, 26 Apr 2020 18:28:14 +0200	[thread overview]
Message-ID: <3014980.06ggM8U1O4@kreacher> (raw)
In-Reply-To: <20200422072607.18179-1-rui.zhang@intel.com>

On Wednesday, April 22, 2020 9:26:07 AM CEST Zhang Rui wrote:
> It is possible for ACPI _CST to return only one ACPI C-state, for
> example, when deep cstate disabled in the BIOS.
> And it is better for the acpi_idle driver to probe in this case as well
> for consistency.
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/acpi/processor_idle.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index dcc289e30166..75534c5b5433 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -308,11 +308,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
>  	if (ret)
>  		return ret;
>  
> -	/*
> -	 * It is expected that there will be at least 2 states, C1 and
> -	 * something else (C2 or C3), so fail if that is not the case.
> -	 */
> -	if (pr->power.count < 2)
> +	if (!pr->power.count)
>  		return -EFAULT;
>  
>  	pr->flags.has_cst = 1;
> @@ -468,8 +464,7 @@ static int acpi_processor_get_cstate_info(struct acpi_processor *pr)
>  	for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
>  		if (pr->power.states[i].valid) {
>  			pr->power.count = i;
> -			if (pr->power.states[i].type >= ACPI_STATE_C2)
> -				pr->flags.power = 1;
> +			pr->flags.power = 1;
>  		}
>  	}
>  
> 

Applied as 5.8-candidate material, thanks!





      reply	other threads:[~2020-04-26 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  7:26 [PATCH] ACPI: processor: allowing probing on platforms with one ACPI C-state Zhang Rui
2020-04-26 16:28 ` Rafael J. Wysocki [this message]

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=3014980.06ggM8U1O4@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox