]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
intel_idle: Add AlderLake support
authorZhang Rui <rui.zhang@intel.com>
Fri, 15 Apr 2022 09:39:51 +0000 (17:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:42:27 +0000 (14:42 +0200)
commitbeda6c9fc4d2bc6950ab03e6072d74fe4c2e8b59
treec09ac656c2d986da04f94cd757b5ec682e26850a
parent564cd488af2e6677c39cadd6e0b41630c1b1e4e9
intel_idle: Add AlderLake support

[ Upstream commit d1cf8bbfed1edc5108220342ab39e4544d55fbc3 ]

Similar to SPR, the C1 and C1E states on ADL are mutually exclusive.
Only one of them can be enabled at a time.

But contrast to SPR, which usually has a strong latency requirement
as a Xeon processor, C1E is preferred on ADL for better energy
efficiency.

Add custom C-state tables for ADL with both C1 and C1E, and

 1. Enable the "C1E promotion" bit in MSR_IA32_POWER_CTL and mark C1
    with the CPUIDLE_FLAG_UNUSABLE flag, so C1 is not available by
    default.

 2. Add support for the "preferred_cstates" module parameter, so that
    users can choose to use C1 instead of C1E by booting with
    "intel_idle.preferred_cstates=2".

Separate custom C-state tables are introduced for the ADL mobile and
desktop processors, because of the exit latency differences between
these two variants, especially with respect to PC10.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[ rjw: Changelog edits, code rearrangement ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/idle/intel_idle.c