All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: processor: idle: Add debug log for the state whose entry method is illegal
@ 2025-11-25  6:47 Huisong Li
  2025-12-08 16:35 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Huisong Li @ 2025-11-25  6:47 UTC (permalink / raw)
  To: rafael, lenb
  Cc: linux-acpi, linux-kernel, Sudeep.Holla, linuxarm,
	jonathan.cameron, zhanjie9, zhenglifeng1, yubowen8, lihuisong

According to ACPI spec, entry method in LPI sub-package must be buffer
or integer. Driver will disable the state whose the entry method is
illegal by zero flags in struct acpi_lpi_state. The entry method is
very key in cpuidle. A debug log is very useful developers.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/acpi/processor_idle.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 22909fccf0b1..5f86297c8b23 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -946,6 +946,8 @@ static int acpi_processor_evaluate_lpi(acpi_handle handle,
 			lpi_state->entry_method = ACPI_CSTATE_INTEGER;
 			lpi_state->address = obj->integer.value;
 		} else {
+			pr_debug("Entry method of state-%d is illegal, disable it.\n",
+				 state_idx);
 			continue;
 		}
 
-- 
2.33.0


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

* Re: [PATCH] ACPI: processor: idle: Add debug log for the state whose entry method is illegal
  2025-11-25  6:47 [PATCH] ACPI: processor: idle: Add debug log for the state whose entry method is illegal Huisong Li
@ 2025-12-08 16:35 ` Jonathan Cameron
  2026-01-14 16:48   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2025-12-08 16:35 UTC (permalink / raw)
  To: Huisong Li, linuxarm
  Cc: rafael, lenb, linux-acpi, linux-kernel, Sudeep.Holla,
	jonathan.cameron, zhanjie9, zhenglifeng1, yubowen8

On Tue, 25 Nov 2025 14:47:02 +0800
Huisong Li <lihuisong@huawei.com> wrote:

> According to ACPI spec, entry method in LPI sub-package must be buffer
> or integer. Driver will disable the state whose the entry method is
> illegal by zero flags in struct acpi_lpi_state. The entry method is
> very key in cpuidle. A debug log is very useful developers.
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
Seems reasonable to me and debug is probably appropriate error for broken
firmware. 
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

> ---
>  drivers/acpi/processor_idle.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index 22909fccf0b1..5f86297c8b23 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -946,6 +946,8 @@ static int acpi_processor_evaluate_lpi(acpi_handle handle,
>  			lpi_state->entry_method = ACPI_CSTATE_INTEGER;
>  			lpi_state->address = obj->integer.value;
>  		} else {
> +			pr_debug("Entry method of state-%d is illegal, disable it.\n",
> +				 state_idx);
>  			continue;
>  		}
>  


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

* Re: [PATCH] ACPI: processor: idle: Add debug log for the state whose entry method is illegal
  2025-12-08 16:35 ` Jonathan Cameron
@ 2026-01-14 16:48   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2026-01-14 16:48 UTC (permalink / raw)
  To: Jonathan Cameron, Huisong Li
  Cc: linuxarm, linux-acpi, linux-kernel, Sudeep.Holla, zhanjie9,
	zhenglifeng1, yubowen8

On Mon, Dec 8, 2025 at 5:35 PM Jonathan Cameron
<jonathan.cameron@huawei.com> wrote:
>
> On Tue, 25 Nov 2025 14:47:02 +0800
> Huisong Li <lihuisong@huawei.com> wrote:
>
> > According to ACPI spec, entry method in LPI sub-package must be buffer
> > or integer. Driver will disable the state whose the entry method is
> > illegal by zero flags in struct acpi_lpi_state. The entry method is
> > very key in cpuidle. A debug log is very useful developers.
> >
> > Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Seems reasonable to me and debug is probably appropriate error for broken
> firmware.
> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

Applied as 6.20 material, thanks!

> > ---
> >  drivers/acpi/processor_idle.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> > index 22909fccf0b1..5f86297c8b23 100644
> > --- a/drivers/acpi/processor_idle.c
> > +++ b/drivers/acpi/processor_idle.c
> > @@ -946,6 +946,8 @@ static int acpi_processor_evaluate_lpi(acpi_handle handle,
> >                       lpi_state->entry_method = ACPI_CSTATE_INTEGER;
> >                       lpi_state->address = obj->integer.value;
> >               } else {
> > +                     pr_debug("Entry method of state-%d is illegal, disable it.\n",
> > +                              state_idx);
> >                       continue;
> >               }
> >
>

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

end of thread, other threads:[~2026-01-14 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25  6:47 [PATCH] ACPI: processor: idle: Add debug log for the state whose entry method is illegal Huisong Li
2025-12-08 16:35 ` Jonathan Cameron
2026-01-14 16:48   ` Rafael J. Wysocki

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.