* Re: ACPI: Processor native C-states using MWAIT
@ 2006-10-17 23:19 Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2006-10-17 23:19 UTC (permalink / raw)
To: Venkatesh Pallipadi, Linux Kernel Mailing List
This patch breaks C-state discovery on my IBM IntelliStation Z30
because the return value of acpi_processor_get_power_info_fadt is not
assigned to "result" in the case that acpi_processor_get_power_info_cst
returns -ENODEV. Thus, if ACPI provides C-state data via the FADT and
not _CST (as is the case on this machine), we incorrectly exit the
function with -ENODEV after reading the FADT. The attached patch
sets the value of result so that we don't exit early.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
--
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 526387d..5c118cb 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -962,7 +962,7 @@ static int acpi_processor_get_power_info
result = acpi_processor_get_power_info_cst(pr);
if (result == -ENODEV)
- acpi_processor_get_power_info_fadt(pr);
+ result = acpi_processor_get_power_info_fadt(pr);
if (result)
return result;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: ACPI: Processor native C-states using MWAIT
@ 2006-10-18 0:16 Pallipadi, Venkatesh
0 siblings, 0 replies; 2+ messages in thread
From: Pallipadi, Venkatesh @ 2006-10-18 0:16 UTC (permalink / raw)
To: Darrick J. Wong, Andrew Morton; +Cc: Linux Kernel Mailing List
Acked
Andrew: Please apply this patch.
Thanks,
Venki
>-----Original Message-----
>From: Darrick J. Wong [mailto:djwong@us.ibm.com]
>Sent: Tuesday, October 17, 2006 4:19 PM
>To: Pallipadi, Venkatesh; Linux Kernel Mailing List
>Subject: Re: ACPI: Processor native C-states using MWAIT
>
>This patch breaks C-state discovery on my IBM IntelliStation Z30
>because the return value of acpi_processor_get_power_info_fadt is not
>assigned to "result" in the case that acpi_processor_get_power_info_cst
>returns -ENODEV. Thus, if ACPI provides C-state data via the FADT and
>not _CST (as is the case on this machine), we incorrectly exit the
>function with -ENODEV after reading the FADT. The attached patch
>sets the value of result so that we don't exit early.
>
>Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
>
>--
>
>diff --git a/drivers/acpi/processor_idle.c
>b/drivers/acpi/processor_idle.c
>index 526387d..5c118cb 100644
>--- a/drivers/acpi/processor_idle.c
>+++ b/drivers/acpi/processor_idle.c
>@@ -962,7 +962,7 @@ static int acpi_processor_get_power_info
>
> result = acpi_processor_get_power_info_cst(pr);
> if (result == -ENODEV)
>- acpi_processor_get_power_info_fadt(pr);
>+ result = acpi_processor_get_power_info_fadt(pr);
>
> if (result)
> return result;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-18 0:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-17 23:19 ACPI: Processor native C-states using MWAIT Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2006-10-18 0:16 Pallipadi, Venkatesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox