Skip to contentSkip to conversation

cpufrequtils: Remove proc compile option and interfaces

PATCH Applied Thomas Renninger 2 participants 2 messages Sep 1, 2010 – Sep 4, 2010

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

PATCH 1/1 cpufrequtils: Remove proc compile option and interfaces

proc cpufreq kernel support is deprecated since the beginning of 2.6?) If someone still likes to have support for the 2.4 cpufreq proc interface one has to pick out an old cpufrequtils version from now on...

---
 Makefile         |   29 +-------
 lib/cpufreq.c    |   99 ++++--------------------
 lib/interfaces.h |   76 -------------------
 lib/proc.c       |  216 ------------------------------------------------------
 lib/sysfs.h      |   19 +++++
 po/cs.po         |  186 ++++++++++++++++++++++++++++-------------------
 po/de.po         |    2 +-
 po/fr.po         |  187 ++++++++++++++++++++++++++++-------------------
 po/it.po         |    2 +-
 po/pt.po         |    2 +-
 10 files changed, 265 insertions(+), 553 deletions(-)
 delete mode 100644 lib/interfaces.h
 delete mode 100644 lib/proc.c
 create mode 100644 lib/sysfs.h
Makefile +3 -26
index 3ef2af7..e23c644 100644
@@ -37,13 +37,6 @@ NLS ?=		true
 # cpufreq-bench benchmarking tool
 CPUFRQ_BENCH ?= false
 
-# Use the sysfs-based interface which is included in all 2.6 kernels
-# built with cpufreq support
-SYSFS ?=	true
-
-# Use the proc-based interface which is used in the 2.4 patch for cpufreq
-PROC ?=		true
-
 # Prefix to the directories we're installing to
 DESTDIR ?=	
 
@@ -119,24 +112,12 @@ CPPFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
 		-DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
 
 UTIL_SRC = 	utils/info.c utils/set.c utils/aperf.c utils/cpuid.h
-LIB_HEADERS = 	lib/cpufreq.h lib/interfaces.h
-LIB_SRC = 	lib/cpufreq.c
-LIB_OBJS = 	lib/cpufreq.o
+LIB_HEADERS = 	lib/cpufreq.h lib/sysfs.h
+LIB_SRC = 	lib/cpufreq.c lib/sysfs.c
+LIB_OBJS = 	lib/cpufreq.o lib/sysfs.o
 
 CFLAGS +=	-pipe
 
-ifeq ($(strip $(PROC)),true)
-	LIB_OBJS += lib/proc.o
-	LIB_SRC += lib/proc.c
-	CPPFLAGS += -DINTERFACE_PROC
-endif
-
-ifeq ($(strip $(SYSFS)),true)
-	LIB_OBJS += lib/sysfs.o
-	LIB_SRC += lib/sysfs.c
-	CPPFLAGS += -DINTERFACE_SYSFS
-endif
-
 ifeq ($(strip $(NLS)),true)
 	INSTALL_NLS += install-gmo
 	COMPILE_NLS += update-gmo
@@ -183,10 +164,6 @@ lib/%.o: $(LIB_SRC) $(LIB_HEADERS) build/ccdv
 	$(QUIET) $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ -c lib/$*.c
 
 libcpufreq.so.$(LIB_MAJ): $(LIB_OBJS)
-	@if [ $(strip $(SYSFS)) != true -a $(strip $(PROC)) != true ]; then \
-		echo '*** At least one of /sys support or /proc support MUST be enabled ***'; \
-		exit -1; \
-	fi;
 	$(QUIET) $(CC) -shared $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
 		-Wl,-soname,libcpufreq.so.$(LIB_MIN) $(LIB_OBJS)
 	@ln -sf $@ libcpufreq.so
lib/cpufreq.c +17 -82

188 lines not on this page · raw message

lib/interfaces.h deleted +0 -76

76 lines not on this page · raw message

lib/proc.c deleted +0 -216

216 lines not on this page · raw message

lib/sysfs.h new file +19 -0
new file mode 100644
index 0000000..b8a2b69
@@ -0,0 +1,19 @@
+extern unsigned int sysfs_cpu_exists(unsigned int cpu);
+extern unsigned long sysfs_get_freq_kernel(unsigned int cpu);
+extern unsigned long sysfs_get_freq_hardware(unsigned int cpu);
+extern unsigned long sysfs_get_transition_latency(unsigned int cpu);
+extern int sysfs_get_hardware_limits(unsigned int cpu, unsigned long *min, unsigned long *max);
+extern char * sysfs_get_driver(unsigned int cpu);
+extern struct cpufreq_policy * sysfs_get_policy(unsigned int cpu);
+extern struct cpufreq_available_governors * sysfs_get_available_governors(unsigned int cpu);
+extern struct cpufreq_available_frequencies * sysfs_get_available_frequencies(unsigned int cpu);
+extern struct cpufreq_affected_cpus * sysfs_get_affected_cpus(unsigned int cpu);
+extern struct cpufreq_affected_cpus * sysfs_get_related_cpus(unsigned int cpu);
+extern struct cpufreq_stats * sysfs_get_stats(unsigned int cpu, unsigned long long *total_time);
+extern unsigned long sysfs_get_transitions(unsigned int cpu);
+extern int sysfs_set_policy(unsigned int cpu, struct cpufreq_policy *policy);
+extern int sysfs_modify_policy_min(unsigned int cpu, unsigned long min_freq);
+extern int sysfs_modify_policy_max(unsigned int cpu, unsigned long max_freq);
+extern int sysfs_modify_policy_governor(unsigned int cpu, char *governor);
+extern int sysfs_set_frequency(unsigned int cpu, unsigned long target_frequency);
+
po/cs.po +111 -75

407 lines not on this page · raw message

po/de.po +1 -1
index 4c3a2bb..a5970ae 100644
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: cpufrequtils 006\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-08-09 11:53+0200\n"
+"POT-Creation-Date: 2010-09-01 01:20+0200\n"
 "PO-Revision-Date: 2009-08-08 17:18+0100\n"
 "Last-Translator:  <[email protected]>\n"
 "Language-Team: NONE\n"
po/fr.po +112 -75

410 lines not on this page · raw message

po/it.po +1 -1
index 36f09ed..4e9aa83 100644
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: cpufrequtils 0.3\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-08-09 11:53+0200\n"
+"POT-Creation-Date: 2010-09-01 01:20+0200\n"
 "PO-Revision-Date: 2009-08-15 12:00+0900\n"
 "Last-Translator: Mattia Dongili <[email protected]>\n"
 "Language-Team: NONE\n"
po/pt.po +1 -1
index 75cca0d..2baf1d5 100644
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: cpufrequtils 004\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-08-09 11:53+0200\n"
+"POT-Creation-Date: 2010-09-01 01:20+0200\n"
 "PO-Revision-Date: 2008-06-14 22:16-0400\n"
 "Last-Translator: Claudio Eduardo <[email protected]>\n"
 "MIME-Version: 1.0\n"
Signature · 1 line
1.6.4.2
#1 lore raw
Quoted 4 lines · Thomas Renninger

proc cpufreq kernel support is deprecated since the beginning of 2.6?) If someone still likes to have support for the 2.4 cpufreq proc interface one has to pick out an old cpufrequtils version from now on...

Applied, thanks

Dominik