| 8395d439 | 18-Dec-2024 |
Mario Limonciello <mario.limonciello@amd.com> |
cpupower: Adjust whitespace for amd-pstate specific prints
The amd-pstate section is grouped under boost, which isn't appropriate.
Adjust the indentation so that it is it's own section.
Link: http
cpupower: Adjust whitespace for amd-pstate specific prints
The amd-pstate section is grouped under boost, which isn't appropriate.
Adjust the indentation so that it is it's own section.
Link: https://lore.kernel.org/r/20241218191144.3440854-8-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| eb426fc6 | 19-Jun-2023 |
Wyes Karny <wyes.karny@amd.com> |
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 shou
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>
show more ...
|
| df8776b0 | 19-Jun-2023 |
Wyes Karny <wyes.karny@amd.com> |
cpupower: Add support for amd_pstate mode change
amd_pstate supports changing of its mode dynamically via `status` sysfs file. Add the same capability in cpupower. To change the mode to active mode
cpupower: Add support for amd_pstate mode change
amd_pstate supports changing of its mode dynamically via `status` sysfs file. Add the same capability in cpupower. To change the mode to active mode use below command:
cpupower set --amd-pstate-mode active
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>
show more ...
|
| d8363e29 | 22-Feb-2022 |
Huang Rui <ray.huang@amd.com> |
cpupower: Add function to print AMD P-State performance capabilities
AMD P-State kernel module is using the fine grain frequency instead of acpi hardware pstate. So add a function to print performan
cpupower: Add function to print AMD P-State performance capabilities
AMD P-State kernel module is using the fine grain frequency instead of acpi hardware pstate. So add a function to print 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>
show more ...
|
| 35fdf42d | 22-Feb-2022 |
Huang Rui <ray.huang@amd.com> |
cpupower: Move print_speed function into misc helper
The print_speed can be as a common function, and expose it into misc helper header. Then it can be used on other helper files as well.
Reviewed-
cpupower: Move print_speed function into misc helper
The print_speed can be as a common function, and expose it into misc helper header. Then it can be used on other helper files as well.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| bf9801ba | 22-Feb-2022 |
Huang Rui <ray.huang@amd.com> |
cpupower: Enable boost state support for AMD P-State module
The legacy ACPI hardware P-States function has 3 P-States on ACPI table, the CPU frequency only can be switched between the 3 P-States. Wh
cpupower: Enable boost state support for AMD P-State module
The legacy ACPI hardware P-States function has 3 P-States on ACPI table, the CPU frequency only can be switched between the 3 P-States. While the processor supports the boost state, it will have another boost state that the frequency can be higher than P0 state, and the state can be decoded by the function of decode_pstates() and read by amd_pci_get_num_boost_states().
However, the new AMD P-State function is different than legacy ACPI hardware P-State on AMD processors. That has a finer grain frequency range between the highest and lowest frequency. And boost frequency is actually the frequency which is mapped on highest performance ratio. The similar previous P0 frequency is mapped on nominal performance ratio. If the highest performance on the processor is higher than nominal performance, then we think the current processor supports the boost state. And it uses amd_pstate_boost_init() to initialize boost for AMD P-State function.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 083792f3 | 22-Feb-2022 |
Huang Rui <ray.huang@amd.com> |
cpupower: Initial AMD P-State capability
If kernel starts the AMD P-State module, the cpupower will initial the capability flag as CPUPOWER_CAP_AMD_PSTATE. And once AMD P-State capability is set, it
cpupower: Initial AMD P-State capability
If kernel starts the AMD P-State module, the cpupower will initial the capability flag as CPUPOWER_CAP_AMD_PSTATE. And once AMD P-State capability is set, it won't need to set legacy ACPI relative capabilities anymore.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 46c273a0 | 22-Feb-2022 |
Huang Rui <ray.huang@amd.com> |
cpupower: Add the function to check AMD P-State enabled
The processor with AMD P-State function also supports legacy ACPI hardware P-States feature as well. Once driver sets AMD P-State eanbled, the
cpupower: Add the function to check AMD P-State enabled
The processor with AMD P-State function also supports legacy ACPI hardware P-States feature as well. Once driver sets AMD P-State eanbled, the processor will respond the finer grain AMD P-State feature instead of legacy ACPI P-States. So it introduces the cpupower_amd_pstate_enabled() to check whether the current kernel enables AMD P-State or AMD CPUFreq module.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 3a3ecfdb | 25-Jan-2021 |
Nathan Fontenot <nathan.fontenot@amd.com> |
cpupower: Add cpuid cap flag for MSR_AMD_HWCR support
Remove the family check for accessing the MSR_AMD_HWCR MSR and replace it with a cpupower cap flag.
This update also allows for the removal of
cpupower: Add cpuid cap flag for MSR_AMD_HWCR support
Remove the family check for accessing the MSR_AMD_HWCR MSR and replace it with a cpupower cap flag.
This update also allows for the removal of the local cpupower_cpu_info variable in cpufreq_has_boost_support() since we no longer need it to check the family.
Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| d1abc4e9 | 25-Jan-2021 |
Nathan Fontenot <nathan.fontenot@amd.com> |
cpupower: Remove family arg to decode_pstates()
The decode_pstates() routine no longer uses the CPU family and the caleed routines (get_cof() and get_did()) can grab the family from the global cpupo
cpupower: Remove family arg to decode_pstates()
The decode_pstates() routine no longer uses the CPU family and the caleed routines (get_cof() and get_did()) can grab the family from the global cpupower_cpu_info struct. These update removes passing the family arg to all these routines.
Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 56a85eeb | 25-Jan-2021 |
Nathan Fontenot <nathan.fontenot@amd.com> |
cpupower: Condense pstate enabled bit checks in decode_pstates()
The enabled bit (bit 63) is common for all families so we can remove the multiple enabled checks based on family and have a common ch
cpupower: Condense pstate enabled bit checks in decode_pstates()
The enabled bit (bit 63) is common for all families so we can remove the multiple enabled checks based on family and have a common check for HW pstate enabled.
Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 23765b82 | 25-Jan-2021 |
Nathan Fontenot <nathan.fontenot@amd.com> |
cpupower: Update family checks when decoding HW pstates
The family checks in get_cof() and get_did() need to use the correct MSR format depending on the family. Add a cpupower capability for using t
cpupower: Update family checks when decoding HW pstates
The family checks in get_cof() and get_did() need to use the correct MSR format depending on the family. Add a cpupower capability for using the pstatedef (family 17h and newer) to control this instead of direct family checks.
Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 1421de79 | 25-Jan-2021 |
Nathan Fontenot <nathan.fontenot@amd.com> |
cpupower: Remove unused pscur variable.
The pscur variable is set but not uused, just remove it.
This may have previsously been set to validate the MSR_AMD_PSTATE_STATUS MSR. With the addition of t
cpupower: Remove unused pscur variable.
The pscur variable is set but not uused, just remove it.
This may have previsously been set to validate the MSR_AMD_PSTATE_STATUS MSR. With the addition of the CPUPOWER_CAP_AMD_HW_PSTATE cap flag this is no longer needed since the cpuid bit to enable this cap flag also validates that the MSR_AMD_PSTATE_STATUS MSR is present.
Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| a0255a76 | 25-Jan-2021 |
Nathan Fontenot <nathan.fontenot@amd.com> |
cpupower: Add CPUPOWER_CAP_AMD_HW_PSTATE cpuid caps flag
Add a check in get_cpu_info() for the ability to read frequencies from hardware and set the CPUPOWER_CAP_AMD_HW_PSTATE cpuid flag. The cpuid
cpupower: Add CPUPOWER_CAP_AMD_HW_PSTATE cpuid caps flag
Add a check in get_cpu_info() for the ability to read frequencies from hardware and set the CPUPOWER_CAP_AMD_HW_PSTATE cpuid flag. The cpuid flag is set when CPUID_80000007_EDX[7] is set, which is all families >= 10h. The check excludes family 14h because HW pstate reporting was not implemented on family 14h.
This is intended to reduce family checks in the main code paths.
Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Reviewed-by: skhan@linuxfoundation.org Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
| 7a136a8f | 25-Jan-2021 |
Robert Richter <rrichter@amd.com> |
cpupower: Correct macro name for CPB caps flag
The name is Core Performance Boost (CPB) for the cpuid flag. Correct cpuid caps flag to use this name (instead of CBP).
Signed-off-by: Robert Richter
cpupower: Correct macro name for CPB caps flag
The name is Core Performance Boost (CPB) for the cpuid flag. Correct cpuid caps flag to use this name (instead of CBP).
Signed-off-by: Robert Richter <rrichter@amd.com> Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|