Skip to content

Commit 06f2f26

Browse files
dedekindopsiff
authored andcommitted
intel_idle: Add Panther Lake C-states table
[Upstream commit d51de21b4c3a34a2cc592319df63864e14b18b29] Panther Lake supports the following requestable C-states: C1, C1E, C6S, C10. The parameters of these C-states should be consistent across all systems based on Panther Lake, so add a custom C-states table for it that will override C-state parameters supplied by platform firmware that may vary from one platform to another and may not represent the most optimum choice. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> [ rjw: Changelog expansion ] Link: https://patch.msgid.link/20260309083818.79588-1-dedekind1@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [Backport from v7.1] Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
1 parent 47bfd14 commit 06f2f26

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

drivers/idle/intel_idle.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,43 @@ static struct cpuidle_state mtl_l_cstates[] __initdata = {
973973
.enter = NULL }
974974
};
975975

976+
static struct cpuidle_state ptl_cstates[] __initdata = {
977+
{
978+
.name = "C1",
979+
.desc = "MWAIT 0x00",
980+
.flags = MWAIT2flg(0x00),
981+
.exit_latency = 1,
982+
.target_residency = 1,
983+
.enter = &intel_idle,
984+
.enter_s2idle = intel_idle_s2idle, },
985+
{
986+
.name = "C1E",
987+
.desc = "MWAIT 0x01",
988+
.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
989+
.exit_latency = 10,
990+
.target_residency = 10,
991+
.enter = &intel_idle,
992+
.enter_s2idle = intel_idle_s2idle, },
993+
{
994+
.name = "C6S",
995+
.desc = "MWAIT 0x21",
996+
.flags = MWAIT2flg(0x21) | CPUIDLE_FLAG_TLB_FLUSHED,
997+
.exit_latency = 300,
998+
.target_residency = 300,
999+
.enter = &intel_idle,
1000+
.enter_s2idle = intel_idle_s2idle, },
1001+
{
1002+
.name = "C10",
1003+
.desc = "MWAIT 0x60",
1004+
.flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,
1005+
.exit_latency = 370,
1006+
.target_residency = 2500,
1007+
.enter = &intel_idle,
1008+
.enter_s2idle = intel_idle_s2idle, },
1009+
{
1010+
.enter = NULL }
1011+
};
1012+
9761013
static struct cpuidle_state gmt_cstates[] __initdata = {
9771014
{
9781015
.name = "C1",
@@ -1551,6 +1588,10 @@ static const struct idle_cpu idle_cpu_mtl_l __initconst = {
15511588
.state_table = mtl_l_cstates,
15521589
};
15531590

1591+
static const struct idle_cpu idle_cpu_ptl __initconst = {
1592+
.state_table = ptl_cstates,
1593+
};
1594+
15541595
static const struct idle_cpu idle_cpu_gmt __initconst = {
15551596
.state_table = gmt_cstates,
15561597
};
@@ -1659,6 +1700,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
16591700
X86_MATCH_VFM(INTEL_ALDERLAKE, &idle_cpu_adl),
16601701
X86_MATCH_VFM(INTEL_ALDERLAKE_L, &idle_cpu_adl_l),
16611702
X86_MATCH_VFM(INTEL_METEORLAKE_L, &idle_cpu_mtl_l),
1703+
X86_MATCH_VFM(INTEL_PANTHERLAKE_L, &idle_cpu_ptl),
16621704
X86_MATCH_VFM(INTEL_ATOM_GRACEMONT, &idle_cpu_gmt),
16631705
X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, &idle_cpu_spr),
16641706
X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, &idle_cpu_spr),

0 commit comments

Comments
 (0)