mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
8113ab20e8
... 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
12 lines
327 B
C
12 lines
327 B
C
/* 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);
|