cpupower: Add turbo-boost support in cpupower
authorWyes Karny <wyes.karny@amd.com>
Mon, 19 Jun 2023 19:05:03 +0000 (19:05 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 18 Jul 2023 22:07:01 +0000 (16:07 -0600)
commiteb426fc6bdd6b731cbc0900f24a8c5fba10a7631
tree93f62e6d86ad4591a5832b5cceaa1bd2ec9e7ad6
parentdf8776b03689987e3239f3c010b6dc6ab4185d30
cpupower: Add turbo-boost support in cpupower

If boost sysfs (/sys/devices/system/cpu/cpufreq/boost) file is present
turbo-boost is feature is supported in the hardware. By default this
feature should be enabled. But to disable/enable it write to the sysfs
file. Use the same to control this feature via cpupower.

To enable:
cpupower set --turbo-boost 1

To disable:
cpupower set --turbo-boost 0

Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Tested-by: Perry Yuan <Perry.Yuan@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/power/cpupower/utils/cpupower-set.c
tools/power/cpupower/utils/helpers/helpers.h
tools/power/cpupower/utils/helpers/misc.c