Skip to content

Commit 3a2a401

Browse files
dedekind1Naim
authored andcommitted
intel_idle: Add Panther Lake C-states table
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>
1 parent dbfdfd7 commit 3a2a401

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
@@ -983,6 +983,43 @@ static struct cpuidle_state mtl_l_cstates[] __initdata = {
983983
.enter = NULL }
984984
};
985985

986+
static struct cpuidle_state ptl_cstates[] __initdata = {
987+
{
988+
.name = "C1",
989+
.desc = "MWAIT 0x00",
990+
.flags = MWAIT2flg(0x00),
991+
.exit_latency = 1,
992+
.target_residency = 1,
993+
.enter = &intel_idle,
994+
.enter_s2idle = intel_idle_s2idle, },
995+
{
996+
.name = "C1E",
997+
.desc = "MWAIT 0x01",
998+
.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
999+
.exit_latency = 10,
1000+
.target_residency = 10,
1001+
.enter = &intel_idle,
1002+
.enter_s2idle = intel_idle_s2idle, },
1003+
{
1004+
.name = "C6S",
1005+
.desc = "MWAIT 0x21",
1006+
.flags = MWAIT2flg(0x21) | CPUIDLE_FLAG_TLB_FLUSHED,
1007+
.exit_latency = 300,
1008+
.target_residency = 300,
1009+
.enter = &intel_idle,
1010+
.enter_s2idle = intel_idle_s2idle, },
1011+
{
1012+
.name = "C10",
1013+
.desc = "MWAIT 0x60",
1014+
.flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,
1015+
.exit_latency = 370,
1016+
.target_residency = 2500,
1017+
.enter = &intel_idle,
1018+
.enter_s2idle = intel_idle_s2idle, },
1019+
{
1020+
.enter = NULL }
1021+
};
1022+
9861023
static struct cpuidle_state gmt_cstates[] __initdata = {
9871024
{
9881025
.name = "C1",
@@ -1561,6 +1598,10 @@ static const struct idle_cpu idle_cpu_mtl_l __initconst = {
15611598
.state_table = mtl_l_cstates,
15621599
};
15631600

1601+
static const struct idle_cpu idle_cpu_ptl __initconst = {
1602+
.state_table = ptl_cstates,
1603+
};
1604+
15641605
static const struct idle_cpu idle_cpu_gmt __initconst = {
15651606
.state_table = gmt_cstates,
15661607
};
@@ -1669,6 +1710,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
16691710
X86_MATCH_VFM(INTEL_ALDERLAKE, &idle_cpu_adl),
16701711
X86_MATCH_VFM(INTEL_ALDERLAKE_L, &idle_cpu_adl_l),
16711712
X86_MATCH_VFM(INTEL_METEORLAKE_L, &idle_cpu_mtl_l),
1713+
X86_MATCH_VFM(INTEL_PANTHERLAKE_L, &idle_cpu_ptl),
16721714
X86_MATCH_VFM(INTEL_ATOM_GRACEMONT, &idle_cpu_gmt),
16731715
X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, &idle_cpu_spr),
16741716
X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, &idle_cpu_spr),

0 commit comments

Comments
 (0)