summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-07-19 19:33:25 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-07-19 19:33:25 +0000
commit10054efa43683a25e18eb4d72b8799d0525639c7 (patch)
tree36518579e81583efa2fe29036509a5eaf0343783 /sys-power/cpufreqd/files
parentMarked ppc stable for bug #323195. (diff)
downloadhistorical-10054efa43683a25e18eb4d72b8799d0525639c7.tar.gz
historical-10054efa43683a25e18eb4d72b8799d0525639c7.tar.bz2
historical-10054efa43683a25e18eb4d72b8799d0525639c7.zip
old
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-power/cpufreqd/files')
-rw-r--r--sys-power/cpufreqd/files/2.2.1-cpu_all.patch35
-rw-r--r--sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch155
-rw-r--r--sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch156
-rw-r--r--sys-power/cpufreqd/files/nvclock0.8b-fd.patch12
-rw-r--r--sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch20
5 files changed, 0 insertions, 378 deletions
diff --git a/sys-power/cpufreqd/files/2.2.1-cpu_all.patch b/sys-power/cpufreqd/files/2.2.1-cpu_all.patch
deleted file mode 100644
index 5613345d48e9..000000000000
--- a/sys-power/cpufreqd/files/2.2.1-cpu_all.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- cpufreqd-2.2.1.orig/src/cpufreqd_cpu.c 2007-08-03 13:55:54.000000000 +0200
-+++ cpufreqd-2.2.1/src/cpufreqd_cpu.c 2007-08-03 14:17:36.000000000 +0200
-@@ -222,7 +222,7 @@
- /* special handling for CPU_ALL and CPU_ANY */
- if (c->cpu == CPU_ANY || c->cpu == CPU_ALL) {
- for (i = 0; i < cinfo->cpus; i++) {
-- clog(LOG_DEBUG, "CPU%d user=%d nice=%d sys=%d\n", c->cpu,
-+ clog(LOG_DEBUG, "CPU%d user=%d nice=%d sys=%d\n", i,
- cusage[i].c_user, cusage[i].c_nice, cusage[i].c_sys);
- cpu_percent = calculate_cpu_usage(&cusage[i], &cusage_old[i], c->nice_scale);
- clog(LOG_DEBUG, "CPU%d %d%% - min=%d max=%d scale=%.2f (%s)\n", i, cpu_percent,
-@@ -234,14 +234,16 @@
- if (c->cpu == CPU_ALL && !(cpu_percent >= c->min && cpu_percent <= c->max))
- break;
- }
-- /* if this code is reached then either CPU_ANY and none matches
-- * or CPU_ALL and all match
-+ /* if this code is reached then
-+ * either CPU_ANY and none matches
-+ * or CPU_ALL and all match, where i == cinfo->cpus
-+ * or CPU_ALL and break was called
- */
-- if (c->cpu == CPU_ANY) {
-- c = c->next;
-- continue;
-- }
-- return MATCH; /*if (c->cpu == ALL)*/
-+ if (c->cpu == CPU_ALL && i == cinfo->cpus)
-+ return MATCH;
-+
-+ c = c->next;
-+ continue;
- }
-
- /* cacluate weighted activity for the requested CPU */
diff --git a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch b/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch
deleted file mode 100644
index b3efd6ad2cfa..000000000000
--- a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch
+++ /dev/null
@@ -1,155 +0,0 @@
---- src/cpufreqd_sensors.c.orig 2009-03-21 07:17:15.000000000 -0400
-+++ src/cpufreqd_sensors.c 2010-01-10 00:28:50.000000000 -0500
-@@ -23,10 +23,22 @@
- #include <string.h>
- #include "cpufreqd_plugin.h"
-
-+#if !defined __GNUC__ || __GNUC__ < 3
-+#define __attribute__(x)
-+#endif
-+
-+#if SENSORS_API_VERSION < 0x400
-+typedef sensors_feature_data sensors_feature;
-+#endif
-+
- /* to hold monitored feature list and avoid reading all sensors */
- struct sensors_monitor {
- const sensors_chip_name *chip;
-- const sensors_feature_data *feat;
-+ char chip_string[MAX_STRING_LEN];
-+ const sensors_feature *feat;
-+#if SENSORS_API_VERSION >= 0x400
-+ const sensors_subfeature *sub_feat;
-+#endif
- double value;
- struct sensors_monitor *next;
- };
-@@ -133,27 +145,73 @@
- struct sensors_monitor *list = monitor_list;
-
- while (list) {
-- sensors_get_feature(*(list->chip), list->feat->number, &list->value);
-- clog(LOG_INFO, "%s: %.3f\n", list->feat->name, list->value);
-+#if SENSORS_API_VERSION >= 0x400
-+ if(sensors_get_value(list->chip, list->sub_feat->number, &list->value) < 0) {
-+#else
-+ if(sensors_get_feature(*(list->chip), list->feat->number, &list->value) < 0) {
-+#endif
-+ clog(LOG_ERR,"could not read value for %s\n",list->feat->name);
-+ return -1;
-+ }
-+ clog(LOG_INFO, "%s:%s: %.3f\n", list->chip_string, list->feat->name, list->value);
- list = list->next;
- }
-
- return 0;
- }
-
-+
-+#if SENSORS_API_VERSION < 0x400
-+/* Adapted from lm-sensors 2.10.8 prog/sensors/main.c */
-+static int sensors_snprintf_chip_name(char *str, size_t size,
-+ const sensors_chip_name *chip)
-+{
-+ switch(chip->bus) {
-+ case SENSORS_CHIP_NAME_BUS_ISA:
-+ return snprintf(str,size,"%s-isa-%04x",chip->prefix,chip->addr);
-+ case SENSORS_CHIP_NAME_BUS_PCI:
-+ return snprintf(str,size,"%s-pci-%04x",chip->prefix,chip->addr);
-+ case SENSORS_CHIP_NAME_BUS_DUMMY:
-+ return snprintf(str,size,"%s-%s-%04x",chip->prefix,chip->busname,chip->addr);
-+ default:
-+ return snprintf(str,size,"%s-i2c-%d-%02x",chip->prefix,chip->bus,chip->addr);
-+ }
-+}
-+#endif
-+
-+__attribute__((unused)) static const char* sensors_get_chip_name(const sensors_chip_name *chip);
-+static const char* sensors_get_chip_name(const sensors_chip_name *chip) {
-+ static char name[MAX_STRING_LEN];
-+ sensors_snprintf_chip_name(name, MAX_STRING_LEN, chip);
-+ return name;
-+}
-+
- /* this function can be pretty expensive (CPU time)?? */
- static struct sensors_monitor * validate_feature_name(const char *name) {
-
- /* get all sensors from first chip */
- const sensors_chip_name *chip;
-- const sensors_feature_data *feat;
-- int nr = 0, nr1 = 0, nr2 = 0;
-+ const sensors_feature *feat;
-+ int nr1 = 0, nr2;
-+#if SENSORS_API_VERSION >= 0x400
-+ const sensors_subfeature *sub_feat;
-+#endif
- struct sensors_monitor *list = monitor_list;
- struct sensors_monitor *ret = NULL;
-
- /* scan the full thing */
-+#if SENSORS_API_VERSION >= 0x400
-+ while ( (chip = sensors_get_detected_chips(NULL, &nr1)) != NULL) {
-+ nr2 = 0;
-+ while ((feat = sensors_get_features(chip, &nr2)) != NULL) {
-+ /* sensor input? */
-+ if((sub_feat = sensors_get_subfeature(chip, feat, feat->type << 8)) == NULL) {
-+ clog(LOG_DEBUG, "Input subfeature not found for %s, skipping\n", feat->name);
-+ continue;
-+ }
-+#else
- while ( (chip = sensors_get_detected_chips(&nr)) != NULL) {
-- nr1 = nr2 = 0;
-+ nr1 = nr2 = 0;
- char *label = NULL;
- clog(LOG_DEBUG, "Examining chip %s(%d)\n", chip->prefix, nr);
- while ((feat = sensors_get_all_features(*chip, &nr1, &nr2)) != NULL) {
-@@ -164,22 +222,33 @@
- if (sensors_get_label(*chip, feat->number, &label) != 0)
- clog(LOG_DEBUG, "Couldn't get label for %s (%s)\n",
- feat->name, strerror(errno));
-+ }
-+#endif
-
- /* is it the one we are looking for? */
-- if (strncmp(feat->name, name, MAX_STRING_LEN) != 0 &&
-- (label && strncmp(label, name, MAX_STRING_LEN) != 0)) {
-- free(label);
-+ if (strncmp(feat->name, name, MAX_STRING_LEN) != 0) {
-+ continue;
-+
-+/* libsensors4 does this in sensors_get_features() */
-+#if SENSORS_API_VERSION < 0x400
-+ /* not ignored? */
-+ } else if(sensors_get_ignored(*chip, feat->number) == 0) {
-+ clog(LOG_INFO, "feature %s on chip %s set to ignore in %s, skipping\n",
-+ feat->name, sensors_get_chip_name(chip), sensors_conffile);
- continue;
-+#endif
-
- /* cache it */
- } else if ((ret = calloc(1, sizeof(struct sensors_monitor))) != NULL) {
-- clog(LOG_DEBUG, "Creating new sensors_monitor for %s (%s)\n",
-- label, feat->name);
-+ sensors_snprintf_chip_name(ret->chip_string, MAX_STRING_LEN, chip);
-+ clog(LOG_DEBUG, "Creating new sensors_monitor for %s on chip %s\n",
-+ name, ret->chip_string);
- ret->chip = chip;
- ret->feat = feat;
-+#if SENSORS_API_VERSION >= 0x400
-+ ret->sub_feat = sub_feat;
-+#endif
- ret->next = NULL;
-- /* free the label here, we are not using it anymore */
-- free(label);
- /* append monitor to the cache list */
- list = monitor_list;
- if (list != NULL) {
-@@ -214,7 +283,7 @@
- clog(LOG_DEBUG, "called with %s\n", ev);
-
- /* try to parse the %[a-zA-Z0-9]:%d-%d format first */
-- if (sscanf(ev, "%32[^:]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) {
-+ if (sscanf(ev, "%32[a-zA-Z0-9]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) {
- /* validate feature name */
- if ((ret->monitor = validate_feature_name(ret->name)) != NULL) {
- clog(LOG_INFO, "parsed %s %.3f-%.3f\n", ret->name, ret->min, ret->max);
diff --git a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch b/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch
deleted file mode 100644
index e15b0bbee37a..000000000000
--- a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch
+++ /dev/null
@@ -1,156 +0,0 @@
---- src/cpufreqd_sensors.c.orig 2009-03-21 12:17:15.000000000 +0100
-+++ src/cpufreqd_sensors.c 2009-08-14 14:39:52.894513594 +0200
-@@ -23,10 +23,22 @@
- #include <string.h>
- #include "cpufreqd_plugin.h"
-
-+#if !defined __GNUC__ || __GNUC__ < 3
-+#define __attribute__(x)
-+#endif
-+
-+#if SENSORS_API_VERSION < 0x400
-+typedef sensors_feature_data sensors_feature;
-+#endif
-+
- /* to hold monitored feature list and avoid reading all sensors */
- struct sensors_monitor {
- const sensors_chip_name *chip;
-- const sensors_feature_data *feat;
-+ char chip_string[MAX_STRING_LEN];
-+ const sensors_feature *feat;
-+#if SENSORS_API_VERSION >= 0x400
-+ const sensors_subfeature *sub_feat;
-+#endif
- double value;
- struct sensors_monitor *next;
- };
-@@ -133,27 +145,74 @@
- struct sensors_monitor *list = monitor_list;
-
- while (list) {
-- sensors_get_feature(*(list->chip), list->feat->number, &list->value);
-- clog(LOG_INFO, "%s: %.3f\n", list->feat->name, list->value);
-+#if SENSORS_API_VERSION >= 0x400
-+ if(sensors_get_value(list->chip, list->sub_feat->number, &list->value) < 0) {
-+#else
-+ if(sensors_get_feature(*(list->chip), list->feat->number, &list->value) < 0) {
-+#endif
-+ clog(LOG_ERR,"could not read value for %s\n",list->feat->name);
-+ return -1;
-+ }
-+ clog(LOG_INFO, "%s:%s: %.3f\n", list->chip_string, list->feat->name, list->value);
- list = list->next;
- }
-
- return 0;
- }
-
-+
-+#if SENSORS_API_VERSION < 0x400
-+/* Adapted from lm-sensors 2.10.8 prog/sensors/main.c */
-+static int sensors_snprintf_chip_name(char *str, size_t size,
-+ const sensors_chip_name *chip)
-+{
-+ switch(chip->bus) {
-+ case SENSORS_CHIP_NAME_BUS_ISA:
-+ return snprintf(str,size,"%s-isa-%04x",chip->prefix,chip->addr);
-+ case SENSORS_CHIP_NAME_BUS_PCI:
-+ return snprintf(str,size,"%s-pci-%04x",chip->prefix,chip->addr);
-+ case SENSORS_CHIP_NAME_BUS_DUMMY:
-+ return snprintf(str,size,"%s-%s-%04x",chip->prefix,chip->busname,chip->addr);
-+ default:
-+ return snprintf(str,size,"%s-i2c-%d-%02x",chip->prefix,chip->bus,chip->addr);
-+ }
-+}
-+#endif
-+
-+__attribute__((unused)) static const char* sensors_get_chip_name(const sensors_chip_name *chip);
-+static const char* sensors_get_chip_name(const sensors_chip_name *chip) {
-+ static char name[MAX_STRING_LEN];
-+ sensors_snprintf_chip_name(name, MAX_STRING_LEN, chip);
-+ return name;
-+}
-+
- /* this function can be pretty expensive (CPU time)?? */
- static struct sensors_monitor * validate_feature_name(const char *name) {
-
- /* get all sensors from first chip */
- const sensors_chip_name *chip;
-- const sensors_feature_data *feat;
-- int nr = 0, nr1 = 0, nr2 = 0;
-+ const sensors_feature *feat;
-+ int nr = 0;
-+#if SENSORS_API_VERSION >= 0x400
-+ const sensors_subfeature *sub_feat;
-+#else
-+ int nr1 = 0, nr2 = 0;
-+#endif
- struct sensors_monitor *list = monitor_list;
- struct sensors_monitor *ret = NULL;
-
- /* scan the full thing */
-+#if SENSORS_API_VERSION >= 0x400
-+ while ( (chip = sensors_get_detected_chips(NULL, &nr)) != NULL) {
-+ while ((feat = sensors_get_features(chip, &nr)) != NULL) {
-+ /* sensor input? */
-+ if((sub_feat = sensors_get_subfeature(chip, feat, feat->type << 8)) == NULL) {
-+ clog(LOG_DEBUG, "Input subfeature not found for %s, skipping\n", feat->name);
-+ continue;
-+ }
-+#else
- while ( (chip = sensors_get_detected_chips(&nr)) != NULL) {
-- nr1 = nr2 = 0;
-+ nr1 = nr2 = 0;
- char *label = NULL;
- clog(LOG_DEBUG, "Examining chip %s(%d)\n", chip->prefix, nr);
- while ((feat = sensors_get_all_features(*chip, &nr1, &nr2)) != NULL) {
-@@ -164,22 +223,33 @@
- if (sensors_get_label(*chip, feat->number, &label) != 0)
- clog(LOG_DEBUG, "Couldn't get label for %s (%s)\n",
- feat->name, strerror(errno));
-+ }
-+#endif
-
- /* is it the one we are looking for? */
-- if (strncmp(feat->name, name, MAX_STRING_LEN) != 0 &&
-- (label && strncmp(label, name, MAX_STRING_LEN) != 0)) {
-- free(label);
-+ if (strncmp(feat->name, name, MAX_STRING_LEN) != 0) {
-+ continue;
-+
-+/* libsensors4 does this in sensors_get_features() */
-+#if SENSORS_API_VERSION < 0x400
-+ /* not ignored? */
-+ } else if(sensors_get_ignored(*chip, feat->number) == 0) {
-+ clog(LOG_INFO, "feature %s on chip %s set to ignore in %s, skipping\n",
-+ feat->name, sensors_get_chip_name(chip), sensors_conffile);
- continue;
-+#endif
-
- /* cache it */
- } else if ((ret = calloc(1, sizeof(struct sensors_monitor))) != NULL) {
-- clog(LOG_DEBUG, "Creating new sensors_monitor for %s (%s)\n",
-- label, feat->name);
-+ sensors_snprintf_chip_name(ret->chip_string, MAX_STRING_LEN, chip);
-+ clog(LOG_DEBUG, "Creating new sensors_monitor for %s on chip %s\n",
-+ name, ret->chip_string);
- ret->chip = chip;
- ret->feat = feat;
-+#if SENSORS_API_VERSION >= 0x400
-+ ret->sub_feat = sub_feat;
-+#endif
- ret->next = NULL;
-- /* free the label here, we are not using it anymore */
-- free(label);
- /* append monitor to the cache list */
- list = monitor_list;
- if (list != NULL) {
-@@ -214,7 +284,7 @@
- clog(LOG_DEBUG, "called with %s\n", ev);
-
- /* try to parse the %[a-zA-Z0-9]:%d-%d format first */
-- if (sscanf(ev, "%32[^:]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) {
-+ if (sscanf(ev, "%32[a-zA-Z0-9]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) {
- /* validate feature name */
- if ((ret->monitor = validate_feature_name(ret->name)) != NULL) {
- clog(LOG_INFO, "parsed %s %.3f-%.3f\n", ret->name, ret->min, ret->max);
diff --git a/sys-power/cpufreqd/files/nvclock0.8b-fd.patch b/sys-power/cpufreqd/files/nvclock0.8b-fd.patch
deleted file mode 100644
index 8925816e7e89..000000000000
--- a/sys-power/cpufreqd/files/nvclock0.8b-fd.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urp nvclock0.8b/src/backend/back_linux.c nvclock0.8b-fd/src/backend/back_linux.c
---- nvclock0.8b/src/backend/back_linux.c 2005-08-29 13:44:56.000000000 +0200
-+++ nvclock0.8b-fd/src/backend/back_linux.c 2005-10-17 01:03:09.000000000 +0200
-@@ -260,6 +260,8 @@ int map_mem(const char *dev_name)
- nv_card.PCIO = map_dev_mem(fd, nv_card.reg_address + 0x601000, 0x2000);
- nv_card.PRAMDAC = map_dev_mem(fd, nv_card.reg_address + 0x680000, 0x2000);
- nv_card.PROM = map_dev_mem(fd, nv_card.reg_address + 0x300000, 0xffff);
-+
-+ close(fd);
-
- return 1;
- }
diff --git a/sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch b/sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch
deleted file mode 100644
index ab926f6c8dc4..000000000000
--- a/sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: nvclock0.8b2/src/backend/Makefile.in
-===================================================================
---- nvclock0.8b2.orig/src/backend/Makefile.in
-+++ nvclock0.8b2/src/backend/Makefile.in
-@@ -5,7 +5,7 @@ RANLIB=@RANLIB@
- system=@system@
- HAVE_NVCONTROL=@HAVE_NVCONTROL@
- OBJECTS=backend.o bios.o config.o error.o nv30.o nv31.o nv40.o info.o overclock.o i2c.o xf86i2c.o adt7473.o f75375.o lm99.o w83781d.o w83l785r.o libc_wrapper.o
--CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol
-+CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol -fPIC
-
- ifeq ($(system), FreeBSD)
- OBJECTS+=back_bsd.o
-@@ -36,4 +36,4 @@ distclean: clean
- rm -f Makefile
-
- install:
--uninstall:
-\ No newline at end of file
-+uninstall: