summaryrefslogtreecommitdiff
path: root/tools/power/cpupower/lib/cpupower_intern.h
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2020-10-15 12:28:58 +0200
committerBorislav Petkov <bp@suse.de>2020-11-16 17:42:12 +0100
commit8113ab20e850491b4144a1a64246f07a2d737a49 (patch)
tree84ff07078bbf6e1e3dda50f7f4b7fff8d8336cd1 /tools/power/cpupower/lib/cpupower_intern.h
parent632211cdd6ad0efeef32c53ac731901b4bed3b94 (diff)
tools/power/cpupower: Read energy_perf_bias from sysfs
... instead of poking at the MSR. For that, move the accessor functions to misc.c and add a sysfs-writing function too. There should be no functional changes resulting from this. Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Cc: Thomas Renninger <trenn@suse.com> Link: https://lkml.kernel.org/r/20201029190259.3476-2-bp@alien8.de
Diffstat (limited to 'tools/power/cpupower/lib/cpupower_intern.h')
-rw-r--r--tools/power/cpupower/lib/cpupower_intern.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/power/cpupower/lib/cpupower_intern.h b/tools/power/cpupower/lib/cpupower_intern.h
index 4887c76d23f8..ac1112b956ec 100644
--- a/tools/power/cpupower/lib/cpupower_intern.h
+++ b/tools/power/cpupower/lib/cpupower_intern.h
@@ -1,6 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0 */
#define PATH_TO_CPU "/sys/devices/system/cpu/"
+
+#ifndef MAX_LINE_LEN
#define MAX_LINE_LEN 4096
+#endif
+
#define SYSFS_PATH_MAX 255
unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen);
+unsigned int cpupower_write_sysfs(const char *path, char *buf, size_t buflen);