From: xufuhai<xufuhai1992@xxxxxxxxx> <mailto:xufuhai@xxxxxxxxxxxx>
If the read_msr function is executed by a non-root user, the function returns
-1, which means that there is no permission to access//dev/cpu//%d/msr, but
cpufreq_has_boost_support should also return -1 immediately, and should not
follow the original logic to return 0, which will cause amd The cpupower tool
returns the boost active state as 0.
Reproduce procedure:
cpupower frequency-info
Reported-by: yangrui<yangrui@xxxxxxxxxxxx> <mailto:yangrui@xxxxxxxxxxxx>
Signed-off-by: xufuhai<xufuhai1992@xxxxxxxxx> <mailto:xufuhai@xxxxxxxxxxxx>
Signed-off-by: chenguanqiao<chenguanqiao@xxxxxxxxxxxx> <mailto:chenguanqiao@xxxxxxxxxxxx>
Signed-off-by: lishujin<lishujin@xxxxxxxxxxxx> <mailto:lishujin@xxxxxxxxxxxx>