linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI / processor_idle: Set default C1 state description
@ 2018-01-29 20:22 Yazen Ghannam
  2018-02-08 10:00 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Yazen Ghannam @ 2018-01-29 20:22 UTC (permalink / raw)
  To: linux-acpi; +Cc: Yazen Ghannam, linux-kernel, rjw, lenb

From: Yazen Ghannam <yazen.ghannam@amd.com>

The acpi_idle driver will default to ACPI_CSTATE_HALT for C1 if a _CST
object for C1 is not defined. However, the description will not be set,
so users will see "<null>" when reading the description from sysfs.

Set the C1 state description when defaulting to ACPI_CSTATE_HALT.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: stable@vger.kernel.org
---
 drivers/acpi/processor_idle.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 5f0071c7e2e1..abb559cd28d7 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -292,6 +292,9 @@ static int acpi_processor_get_power_info_default(struct acpi_processor *pr)
 		pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
 		pr->power.states[ACPI_STATE_C1].valid = 1;
 		pr->power.states[ACPI_STATE_C1].entry_method = ACPI_CSTATE_HALT;
+
+		snprintf(pr->power.states[ACPI_STATE_C1].desc,
+			 ACPI_CX_DESC_LEN, "ACPI HLT");
 	}
 	/* the C0 state only exists as a filler in our array */
 	pr->power.states[ACPI_STATE_C0].valid = 1;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI / processor_idle: Set default C1 state description
  2018-01-29 20:22 [PATCH] ACPI / processor_idle: Set default C1 state description Yazen Ghannam
@ 2018-02-08 10:00 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2018-02-08 10:00 UTC (permalink / raw)
  To: Yazen Ghannam; +Cc: linux-acpi, linux-kernel, lenb

On Monday, January 29, 2018 9:22:49 PM CET Yazen Ghannam wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
> 
> The acpi_idle driver will default to ACPI_CSTATE_HALT for C1 if a _CST
> object for C1 is not defined. However, the description will not be set,
> so users will see "<null>" when reading the description from sysfs.
> 
> Set the C1 state description when defaulting to ACPI_CSTATE_HALT.
> 
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/acpi/processor_idle.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index 5f0071c7e2e1..abb559cd28d7 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -292,6 +292,9 @@ static int acpi_processor_get_power_info_default(struct acpi_processor *pr)
>  		pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
>  		pr->power.states[ACPI_STATE_C1].valid = 1;
>  		pr->power.states[ACPI_STATE_C1].entry_method = ACPI_CSTATE_HALT;
> +
> +		snprintf(pr->power.states[ACPI_STATE_C1].desc,
> +			 ACPI_CX_DESC_LEN, "ACPI HLT");
>  	}
>  	/* the C0 state only exists as a filler in our array */
>  	pr->power.states[ACPI_STATE_C0].valid = 1;
> 

Applied, thanks!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-08 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-29 20:22 [PATCH] ACPI / processor_idle: Set default C1 state description Yazen Ghannam
2018-02-08 10:00 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).