Commit c2789d32 authored by Nathan Fontenot's avatar Nathan Fontenot Committed by Zheng Zengkai
Browse files

cpupower: Add CPUPOWER_CAP_AMD_HW_PSTATE cpuid caps flag

mainline inclusion
from mainline-5.12-rc1-dontuse
commit a0255a76
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4QQWF



--------------------------------

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: default avatarNathan Fontenot <nathan.fontenot@amd.com>
Reviewed-by: default avatarRobert Richter <rrichter@amd.com>
Reviewed-by: default avatar <skhan@linuxfoundation.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarqinyu <qinyu16@huawei.com>
Reviewed-by: default avatarChao Liu <liuchao173@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 2bccfb09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment