Skip to contentSkip to conversation

cpufreq_get()

RFC Ducrot Bruno 2 participants 4 messages Jan 22, 2004 – Jan 24, 2004

lore
Share & tools
lore
#0 lore raw

I'm planing to add the cpufreq_get() in struct cpufreq_driver, but in a hardware fashion, eventually replacing the name by something more appropriate.

Rational:
- almost all drivers that I know (powernow-k7, speedstep-*, longrun, and Im looking the PPC version) can implement it, the only one that I am aware for which it is not possible is the ACPI performance IO driver.

- by accessing driver->cpufreq_get() via a sysfs, we can verify if the 3 mains governors works. Even for longrun, we can verify that the frequency is between min and max.

- we can compare /proc/cpuinfo with the result of cpufreq_get(), helping in debugging things.

- people may want to monitor the real frequency in their applet, so this help for having a more consistent API (google for wmlongrun, for example).

- It is required for the ARM architecture anyway.

Signature · 4 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.
#1 lore raw
Quoted 3 lines · Ducrot Bruno

I'm planing to add the cpufreq_get() in struct cpufreq_driver, but in a hardware fashion, eventually replacing the name by something more appropriate.

I appreciate this suggestion.

Quoted 2 lines

Even for longrun, we
can verify that the frequency is between min and max.

For ->range() drivers [I intend to rename ->setpolicy() to ->range()], we should leave the ->get() function optional in case the speed isn't detectable.

Dominik

_______________________________________________
Cpufreq mailing list
[email protected]
http://www.linux.org.uk/mailman/listinfo/cpufreq

#2 lore raw
Quoted 6 lines · Dominik Brodowski
Quoted 3 lines · Ducrot Bruno

I'm planing to add the cpufreq_get() in struct cpufreq_driver, but in a hardware fashion, eventually replacing the name by something more appropriate.

I appreciate this suggestion.

Fine.

Quoted 7 lines
Quoted 3 lines

Even for longrun, we
can verify that the frequency is between min and max.

For ->range() drivers [I intend to rename ->setpolicy() to ->range()], we should leave the ->get() function optional in case the speed isn't detectable.

Anyway, this must be optional because the ACPI performance driver can't detect speed...

Signature · 4 lines
Ducrot Bruno

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