linux-cpupower-6.10-rc2
This cpupower fixes update for Linux 6.10-rc2 consists of one single fix to cpupower's P-State frequency calculation and reporting with AMD Family 1Ah+ processors, when using the acpi-cpufreq driver. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAmZV+DYACgkQCwJExA0N Qxwl6xAAvoIgykK6Sb86K9ik7gNB8+IVMOv/tcIpB2NyOjLh/BHK3GWJ0xjIAGHc nCMDX3uSYat/VHgIp5CiCOw6B1DEkNu2BIzLAhO1ijaVkug25b5PmWutvpVgpxNW +KVwO3KT/s3hFtF0LEEwqPEy8gtwACQRP9OQuQZfYFyFy6PzKXx3lp9U3nNTsrcB U8HtjSMk4EROxaFfsfRbwolo4UF1BDi387UjeJu8V5fkgAskVDvu1O19pkyjyEme dEzo6OVU8gvMLtoFU5bbC8t8bLs+RUhJSUB/h8R5gIsczrJEebQYLQuaUP315eX+ bHrSv/z+kTz+M8t3fkjr0aYU4b0jeKKQK4LtYqiWDuQbT0LfRcm0zrArF239/mYT PxL6f/cTCi9l2aqOo+FBnzA8buO1ZL2UgPE9Dm6QvdiXvZXbiWh3dlPrXFcr6sWf 6xfHOVKK/l7GvWBeeHFedP2ycZpXcM+F+g/cQ1c4uurOuT/udsgXVEcM2XlZnWrt PTNeqsXl7g/t2z8r5VqXTo+EHfd3k3l1a/A7csONCvVOpVW/pMyGpHnEUkoLE976 eBG6mzEhVzVgLAL1sj0P6JP3Ekt3K3YYtkpg1Dt0CA9X3mmx8OAZqmlootobFhGm Ei/4MZP2ogeg/xuHK657MkXzc2rJpyKUiJ6tT17pnm+6QLnRU7E= =SJ8p -----END PGP SIGNATURE----- Merge tag 'linux-cpupower-6.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux into pm-tools Merge cpupower utility fix for 6.10-rc2 from Shuah Khan: "This cpupower fixes update for Linux 6.10-rc2 consists of one single fix to cpupower's P-State frequency calculation and reporting with AMD Family 1Ah+ processors, when using the acpi-cpufreq driver." * tag 'linux-cpupower-6.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: tools/power/cpupower: Fix Pstate frequency reporting on AMD Family 1Ah CPUs
This commit is contained in:
commit
1ae088232b
@ -41,6 +41,16 @@ union core_pstate {
|
||||
unsigned res1:31;
|
||||
unsigned en:1;
|
||||
} pstatedef;
|
||||
/* since fam 1Ah: */
|
||||
struct {
|
||||
unsigned fid:12;
|
||||
unsigned res1:2;
|
||||
unsigned vid:8;
|
||||
unsigned iddval:8;
|
||||
unsigned idddiv:2;
|
||||
unsigned res2:31;
|
||||
unsigned en:1;
|
||||
} pstatedef2;
|
||||
unsigned long long val;
|
||||
};
|
||||
|
||||
@ -48,6 +58,10 @@ static int get_did(union core_pstate pstate)
|
||||
{
|
||||
int t;
|
||||
|
||||
/* Fam 1Ah onward do not use did */
|
||||
if (cpupower_cpu_info.family >= 0x1A)
|
||||
return 0;
|
||||
|
||||
if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_PSTATEDEF)
|
||||
t = pstate.pstatedef.did;
|
||||
else if (cpupower_cpu_info.family == 0x12)
|
||||
@ -61,12 +75,18 @@ static int get_did(union core_pstate pstate)
|
||||
static int get_cof(union core_pstate pstate)
|
||||
{
|
||||
int t;
|
||||
int fid, did, cof;
|
||||
int fid, did, cof = 0;
|
||||
|
||||
did = get_did(pstate);
|
||||
if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_PSTATEDEF) {
|
||||
fid = pstate.pstatedef.fid;
|
||||
cof = 200 * fid / did;
|
||||
if (cpupower_cpu_info.family >= 0x1A) {
|
||||
fid = pstate.pstatedef2.fid;
|
||||
if (fid > 0x0f)
|
||||
cof = (fid * 5);
|
||||
} else {
|
||||
fid = pstate.pstatedef.fid;
|
||||
cof = 200 * fid / did;
|
||||
}
|
||||
} else {
|
||||
t = 0x10;
|
||||
fid = pstate.pstate.fid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user