diff options
author | Huang Rui <ray.huang@amd.com> | 2022-02-22 23:34:21 +0800 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-02-22 18:36:50 -0700 |
commit | 4a06806e5d4a781d2c81f6064985018562b2604b (patch) | |
tree | 6538f853947200d47228711875e0e0b50f160ef6 /tools/power/cpupower/lib/acpi_cppc.h | |
parent | cpupower: Add the function to get the sysfs value from specific table (diff) | |
download | linux-dev-4a06806e5d4a781d2c81f6064985018562b2604b.tar.xz linux-dev-4a06806e5d4a781d2c81f6064985018562b2604b.zip |
cpupower: Introduce ACPI CPPC library
Kernel ACPI subsytem introduced the sysfs attributes for acpi cppc
library in below path:
/sys/devices/system/cpu/cpuX/acpi_cppc/
And these attributes will be used for AMD P-State driver to provide some
performance and frequency values.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | tools/power/cpupower/lib/acpi_cppc.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/power/cpupower/lib/acpi_cppc.h b/tools/power/cpupower/lib/acpi_cppc.h new file mode 100644 index 000000000000..85ca83080316 --- /dev/null +++ b/tools/power/cpupower/lib/acpi_cppc.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __ACPI_CPPC_H__ +#define __ACPI_CPPC_H__ + +enum acpi_cppc_value { + HIGHEST_PERF, + LOWEST_PERF, + NOMINAL_PERF, + LOWEST_NONLINEAR_PERF, + LOWEST_FREQ, + NOMINAL_FREQ, + REFERENCE_PERF, + WRAPAROUND_TIME, + MAX_CPPC_VALUE_FILES +}; + +unsigned long acpi_cppc_get_data(unsigned int cpu, + enum acpi_cppc_value which); + +#endif /* _ACPI_CPPC_H */ |