]> git.karo-electronics.de Git - linux-beck.git/blobdiff - tools/power/cpupower/utils/helpers/sysfs.c
sched: Remove stale power aware scheduling remnants and dysfunctional knobs
[linux-beck.git] / tools / power / cpupower / utils / helpers / sysfs.c
index c6343024a61158d094c0a831d369b7d1bd8cdb45..96e28c124b5ce25741038e52581249c4f020bf14 100644 (file)
@@ -362,22 +362,7 @@ char *sysfs_get_cpuidle_driver(void)
  */
 int sysfs_get_sched(const char *smt_mc)
 {
-       unsigned long value;
-       char linebuf[MAX_LINE_LEN];
-       char *endp;
-       char path[SYSFS_PATH_MAX];
-
-       if (strcmp("mc", smt_mc) && strcmp("smt", smt_mc))
-               return -EINVAL;
-
-       snprintf(path, sizeof(path),
-               PATH_TO_CPU "sched_%s_power_savings", smt_mc);
-       if (sysfs_read_file(path, linebuf, MAX_LINE_LEN) == 0)
-               return -1;
-       value = strtoul(linebuf, &endp, 0);
-       if (endp == linebuf || errno == ERANGE)
-               return -1;
-       return value;
+       return -ENODEV;
 }
 
 /*
@@ -388,21 +373,5 @@ int sysfs_get_sched(const char *smt_mc)
  */
 int sysfs_set_sched(const char *smt_mc, int val)
 {
-       char linebuf[MAX_LINE_LEN];
-       char path[SYSFS_PATH_MAX];
-       struct stat statbuf;
-
-       if (strcmp("mc", smt_mc) && strcmp("smt", smt_mc))
-               return -EINVAL;
-
-       snprintf(path, sizeof(path),
-               PATH_TO_CPU "sched_%s_power_savings", smt_mc);
-       sprintf(linebuf, "%d", val);
-
-       if (stat(path, &statbuf) != 0)
-               return -ENODEV;
-
-       if (sysfs_write_file(path, linebuf, MAX_LINE_LEN) == 0)
-               return -1;
-       return 0;
+       return -ENODEV;
 }