Skip to contentSkip to conversation

cpufreq core for 2.5.29

PATCH Superseded Dominik Brodowski 1 participant 1 message Jul 28, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq core for 2.5.29

Hi Linus, lkml,

The following patch adds the cpufreq core code to 2.5.29. The cpufreq core offers a common interface to the CPU clock speed features of both ARM and x86 CPUs.

For communication with user space, sysctl entries are placed in /proc/sys/cpu/{0,1,...,NR_CPUS-1}/ . Entries provided are:

speed-min (readonly)
speed-max (readonly)
speed-sync (readonly - all CPUs need the same frequency,
changes affect all CPUs)
speed (read/write)

In order for this code to be built, an architecture must define the CONFIG_CPU_FREQ configuration symbol. The merged ARM code already has the necessary configuration in place; the x86 specific parts will be sent once the core is merged.

Specifically on ARM CPUs, the core is especially important, since various ARM system on a chip implementations derive peripheral clocks from the CPU clock (eg, LCD controllers, SDRAM controllers, etc). The core allows these peripherals to take action either prior and/or after the actual CPU clock adjustment so we don't go out of tolerance.

Comments welcome; however please ensure that the cpufreq development list at [email protected] receives a copy of all comments.

Dominik

kernel/Makefile renamed from kernel/Makefile.orig +2 -1
@@ -10,7 +10,7 @@
 O_TARGET := kernel.o
 
 export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \
-		printk.o platform.o suspend.o
+		printk.o platform.o suspend.o cpufreq.o
 
 obj-y     = sched.o dma.o fork.o exec_domain.o panic.o printk.o \
 	    module.o exit.o itimer.o time.o softirq.o resource.o \
@@ -21,6 +21,7 @@
 obj-$(CONFIG_UID16) += uid16.o
 obj-$(CONFIG_MODULES) += ksyms.o
 obj-$(CONFIG_PM) += pm.o
+obj-$(CONFIG_CPU_FREQ) += cpufreq.o
 obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
 obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o
 
kernel/cpufreq.c new file +723 -0

723 lines not on this page · raw message

include/linux/cpufreq.h new file +113 -0

113 lines not on this page · raw message

include/linux/sysctl.h +72 -0

78 lines not on this page · raw message

kernel/sysctl.c +226 -0

250 lines not on this page · raw message

Documentation/cpufreq new file +303 -0

303 lines not on this page · raw message

+* http://www.brodo.de/cpufreq/