Skip to contentSkip to conversation

CPUFreq core for 2.5.31

PATCH RESEND New Dominik Brodowski 1 participant 1 message Aug 13, 2002

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

PATCH RESEND 1/1 CPUFreq core for 2.5.31

Linus, lkml,

The following patch adds the cpufreq core code to 2.5.31. 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 part will be sent later with the x86 specific patch.

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 dma.o
+		printk.o platform.o suspend.o dma.o cpufreq.o
 
 obj-y     = sched.o fork.o exec_domain.o panic.o printk.o \
 	    module.o exit.o itimer.o time.o softirq.o resource.o \
@@ -22,6 +22,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 +304 -0

304 lines not on this page · raw message