public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] allow the highest frequency if bios think so.
@ 2006-11-21 10:30 Bruno Ducrot
  2006-11-21 11:04 ` Peter Clifton
  2006-11-21 13:51 ` Bruno Ducrot
  0 siblings, 2 replies; 8+ messages in thread
From: Bruno Ducrot @ 2006-11-21 10:30 UTC (permalink / raw)
  To: davej; +Cc: cpufreq, linux-acpi

Hi all,

processor_perflib.c::acpi_processor_ppc_notifier() check if the value
returned by the processor's _PPC method is 0 and return failed if so.
This is wrong since 0 indicate that the bios think the processor can go
to the highest frequency.  This patch for example fix the HP NX 6125 to
allow its highest frequency to be available.

Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>

--- linux-2.6.19-rc6/drivers/acpi/processor_perflib.c	2006/11/21 10:18:39	1.1
+++ linux-2.6.19-rc6/drivers/acpi/processor_perflib.c	2006/11/21 10:18:55
@@ -83,8 +83,6 @@ static int acpi_processor_ppc_notifier(s
 		goto out;
 
 	ppc = (unsigned int)pr->performance_platform_limit;
-	if (!ppc)
-		goto out;
 
 	if (ppc > pr->performance->state_count)
 		goto out;


-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: [PATCH] allow the highest frequency if bios think so.
@ 2006-11-21 15:08 Pallipadi, Venkatesh
  2006-11-21 16:35 ` Bruno Ducrot
  0 siblings, 1 reply; 8+ messages in thread
From: Pallipadi, Venkatesh @ 2006-11-21 15:08 UTC (permalink / raw)
  To: Bruno Ducrot, davej; +Cc: cpufreq, linux-acpi

 

>-----Original Message-----
>From: cpufreq-bounces@lists.linux.org.uk 
>[mailto:cpufreq-bounces@lists.linux.org.uk] On Behalf Of Bruno Ducrot
>Sent: Tuesday, November 21, 2006 5:52 AM
>To: davej@redhat.com
>Cc: cpufreq@lists.linux.org.uk; linux-acpi@vger.kernel.org
>Subject: Re: [PATCH] allow the highest frequency if bios think so.
>
>On Tue, Nov 21, 2006 at 11:30:42AM +0100, Bruno Ducrot wrote:
>> Hi all,
>> 
>> processor_perflib.c::acpi_processor_ppc_notifier() check if the value
>> returned by the processor's _PPC method is 0 and return failed if so.
>> This is wrong since 0 indicate that the bios think the 
>processor can go
>> to the highest frequency.  This patch for example fix the HP 
>NX 6125 to
>> allow its highest frequency to be available.
>> 
>> Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
>> 
>> --- linux-2.6.19-rc6/drivers/acpi/processor_perflib.c	
>2006/11/21 10:18:39	1.1
>> +++ linux-2.6.19-rc6/drivers/acpi/processor_perflib.c	
>2006/11/21 10:18:55
>> @@ -83,8 +83,6 @@ static int acpi_processor_ppc_notifier(s
>>  		goto out;
>>  
>>  	ppc = (unsigned int)pr->performance_platform_limit;
>> -	if (!ppc)
>> -		goto out;


Hmmm Great find.....
A perfect example of the bug that was quietly hiding
under our noses all these years....

>>  	if (ppc > pr->performance->state_count)
>
>BTW I'm wondering if this check should be :
>	if (ppc >= pr->performance->state_count)
>>  		goto out;
>

Yes. I think this should change to >= as well.
Otherwise indexing states with this ppc can go out of bounds.

Thanks,
Venki

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

end of thread, other threads:[~2006-11-29  7:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-21 10:30 [PATCH] allow the highest frequency if bios think so Bruno Ducrot
2006-11-21 11:04 ` Peter Clifton
2006-11-21 11:11   ` Bruno Ducrot
2006-11-29  7:25   ` Maciej Rutecki
2006-11-21 13:51 ` Bruno Ducrot
  -- strict thread matches above, loose matches on Subject: below --
2006-11-21 15:08 Pallipadi, Venkatesh
2006-11-21 16:35 ` Bruno Ducrot
2006-11-21 17:03   ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox