]> git.hungrycats.org Git - linux/commit
tools/power/turbostat: Fix a knl bug
authorZhang Rui <rui.zhang@intel.com>
Sat, 25 Mar 2023 13:57:07 +0000 (21:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:14:57 +0000 (17:14 +0000)
commitb309f567636a24c80e9fbec5472f34d744bf2ee7
treeecd1efc629095c69c5e7e97f5c9f4d051b1ec3b6
parent9b2e63f1bea698178b4bd8e9be140f6a30f0e164
tools/power/turbostat: Fix a knl bug

[ Upstream commit 137f01b3529d292a68d22e9681e2f903c768f790 ]

MSR_KNL_CORE_C6_RESIDENCY should be evaluated only if
1. this is KNL platform
AND
2. need to get C6 residency or need to calculate C1 residency

Fix the broken logic introduced by commit 1e9042b9c8d4 ("tools/power
turbostat: Fix CPU%C1 display value").

Fixes: 1e9042b9c8d4 ("tools/power turbostat: Fix CPU%C1 display value")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/power/x86/turbostat/turbostat.c