* [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 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
1 sibling, 2 replies; 8+ messages in thread
From: Peter Clifton @ 2006-11-21 11:04 UTC (permalink / raw)
To: Bruno Ducrot; +Cc: davej, cpufreq, linux-acpi
On Tue, 2006-11-21 at 11:30 +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.
I don't know about the HP NX 6125, but on my nc 6320, you have to rmmod
psmouse before you shutdown or reboot the computer, otherwise something
upsets the BIOS and it won't run at full speed on next boot up.
Can't hurt to give it a try. The other method to get it working again is
to remove the AC adaptor and the battery for a few seconds, then
re-insert and power up.
Bootup time is also much faster if the psmouse was rmmod'd before
shutdown, or the power was completely removed as above.
Weired indeed!
Peter Clifton
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] allow the highest frequency if bios think so.
2006-11-21 11:04 ` Peter Clifton
@ 2006-11-21 11:11 ` Bruno Ducrot
2006-11-29 7:25 ` Maciej Rutecki
1 sibling, 0 replies; 8+ messages in thread
From: Bruno Ducrot @ 2006-11-21 11:11 UTC (permalink / raw)
To: Peter Clifton; +Cc: davej, linux-acpi, cpufreq
On Tue, Nov 21, 2006 at 11:04:36AM +0000, Peter Clifton wrote:
> On Tue, 2006-11-21 at 11:30 +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.
>
> I don't know about the HP NX 6125, but on my nc 6320, you have to rmmod
> psmouse before you shutdown or reboot the computer, otherwise something
> upsets the BIOS and it won't run at full speed on next boot up.
The proposed patch fix exactly this one on the HP NX 6125.
> Can't hurt to give it a try. The other method to get it working again is
> to remove the AC adaptor and the battery for a few seconds, then
> re-insert and power up.
>
> Bootup time is also much faster if the psmouse was rmmod'd before
> shutdown, or the power was completely removed as above.
Can't tell for this bootup time issue though.
--
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 10:30 [PATCH] allow the highest frequency if bios think so Bruno Ducrot
2006-11-21 11:04 ` Peter Clifton
@ 2006-11-21 13:51 ` Bruno Ducrot
1 sibling, 0 replies; 8+ messages in thread
From: Bruno Ducrot @ 2006-11-21 13:51 UTC (permalink / raw)
To: davej; +Cc: cpufreq, linux-acpi
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;
>
> if (ppc > pr->performance->state_count)
BTW I'm wondering if this check should be :
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
* Re: [PATCH] allow the highest frequency if bios think so.
2006-11-21 15:08 Pallipadi, Venkatesh
@ 2006-11-21 16:35 ` Bruno Ducrot
2006-11-21 17:03 ` Dave Jones
0 siblings, 1 reply; 8+ messages in thread
From: Bruno Ducrot @ 2006-11-21 16:35 UTC (permalink / raw)
To: Pallipadi, Venkatesh; +Cc: davej, cpufreq, linux-acpi
On Tue, Nov 21, 2006 at 07:08:57AM -0800, Pallipadi, Venkatesh wrote:
> Hmmm Great find.....
> A perfect example of the bug that was quietly hiding
> under our noses all these years....
Indeed. I'm actually still surprised why I haven't found it in the
past.
>
> >> 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.
>
Updated.
Correct bound checking from the value returned from _PPC method.
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 16:28:04
@@ -83,10 +83,8 @@ 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)
+ if (ppc >= pr->performance->state_count)
goto out;
cpufreq_verify_within_limits(policy, 0,
--
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 16:35 ` Bruno Ducrot
@ 2006-11-21 17:03 ` Dave Jones
0 siblings, 0 replies; 8+ messages in thread
From: Dave Jones @ 2006-11-21 17:03 UTC (permalink / raw)
To: Bruno Ducrot; +Cc: cpufreq, linux-acpi
On Tue, Nov 21, 2006 at 05:35:14PM +0100, Bruno Ducrot wrote:
> Correct bound checking from the value returned from _PPC method.
>
> Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
Looks good for me, and should go into .19
Len, do you want to push this to Linus through acpi.git ?
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] allow the highest frequency if bios think so.
2006-11-21 11:04 ` Peter Clifton
2006-11-21 11:11 ` Bruno Ducrot
@ 2006-11-29 7:25 ` Maciej Rutecki
1 sibling, 0 replies; 8+ messages in thread
From: Maciej Rutecki @ 2006-11-29 7:25 UTC (permalink / raw)
To: Peter Clifton; +Cc: linux-acpi
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
Peter Clifton napisał(a):
> I don't know about the HP NX 6125, but on my nc 6320, you have to rmmod
> psmouse before you shutdown or reboot the computer, otherwise something
> upsets the BIOS and it won't run at full speed on next boot up.
>
> Can't hurt to give it a try. The other method to get it working again is
> to remove the AC adaptor and the battery for a few seconds, then
> re-insert and power up.
>
> Bootup time is also much faster if the psmouse was rmmod'd before
> shutdown, or the power was completely removed as above.
>
> Weired indeed!
>
> Peter Clifton
The same problem in NX 6310 and - probably - other NX models. When I
forgot remove psmouse sometimes I saw psmouse CRC32 error (or something
similar) after ACPI called power off (at the last moment when power
off). Sorry, it's to fast, so I can't check what is happen.
--
Maciej Rutecki <maciej.rutecki@gmail.com>
http://www.unixy.pl
LTG - Linux Testers Group
(http://www.stardust.webpages.pl/ltg/wiki/)
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3265 bytes --]
^ 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