Skip to content

Commit eeae55e

Browse files
zhang-ruirafaeljw
authored andcommitted
intel_idle: Add Meteorlake support
Add intel_idle support for MeteorLake. C1 and C1E states on Meteorlake are mutually exclusive, like Alderlake and Raptorlake, but they have little latency difference with measureable power difference, so always enable "C1E promotion" bit and expose C1E only. Expose C6 because it has less power compared with C1E, and smaller latency compared with C8/C10. Ignore C8 and expose C10, because C8 does not show latency advantage compared with C10. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent a39b6ac commit eeae55e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

drivers/idle/intel_idle.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,35 @@ static struct cpuidle_state adl_l_cstates[] __initdata = {
923923
.enter = NULL }
924924
};
925925

926+
static struct cpuidle_state mtl_l_cstates[] __initdata = {
927+
{
928+
.name = "C1E",
929+
.desc = "MWAIT 0x01",
930+
.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
931+
.exit_latency = 1,
932+
.target_residency = 1,
933+
.enter = &intel_idle,
934+
.enter_s2idle = intel_idle_s2idle, },
935+
{
936+
.name = "C6",
937+
.desc = "MWAIT 0x20",
938+
.flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED,
939+
.exit_latency = 140,
940+
.target_residency = 420,
941+
.enter = &intel_idle,
942+
.enter_s2idle = intel_idle_s2idle, },
943+
{
944+
.name = "C10",
945+
.desc = "MWAIT 0x60",
946+
.flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,
947+
.exit_latency = 310,
948+
.target_residency = 930,
949+
.enter = &intel_idle,
950+
.enter_s2idle = intel_idle_s2idle, },
951+
{
952+
.enter = NULL }
953+
};
954+
926955
static struct cpuidle_state gmt_cstates[] __initdata = {
927956
{
928957
.name = "C1",
@@ -1349,6 +1378,10 @@ static const struct idle_cpu idle_cpu_adl_l __initconst = {
13491378
.state_table = adl_l_cstates,
13501379
};
13511380

1381+
static const struct idle_cpu idle_cpu_mtl_l __initconst = {
1382+
.state_table = mtl_l_cstates,
1383+
};
1384+
13521385
static const struct idle_cpu idle_cpu_gmt __initconst = {
13531386
.state_table = gmt_cstates,
13541387
};
@@ -1423,6 +1456,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
14231456
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &idle_cpu_icx),
14241457
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &idle_cpu_adl),
14251458
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &idle_cpu_adl_l),
1459+
X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, &idle_cpu_mtl_l),
14261460
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GRACEMONT, &idle_cpu_gmt),
14271461
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &idle_cpu_spr),
14281462
X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &idle_cpu_spr),

0 commit comments

Comments
 (0)