Skip to content

Commit 0ee61c1

Browse files
committed
intel_idle: Add Meteorlake support
JIRA: https://issues.redhat.com/browse/RHEL-47255 commit eeae55e Author: Zhang Rui <rui.zhang@intel.com> Date: Sat Dec 2 02:09:28 2023 +0800 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> Signed-off-by: David Arcari <darcari@redhat.com>
1 parent 786afc2 commit 0ee61c1

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
@@ -918,6 +918,35 @@ static struct cpuidle_state adl_l_cstates[] __initdata = {
918918
.enter = NULL }
919919
};
920920

921+
static struct cpuidle_state mtl_l_cstates[] __initdata = {
922+
{
923+
.name = "C1E",
924+
.desc = "MWAIT 0x01",
925+
.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
926+
.exit_latency = 1,
927+
.target_residency = 1,
928+
.enter = &intel_idle,
929+
.enter_s2idle = intel_idle_s2idle, },
930+
{
931+
.name = "C6",
932+
.desc = "MWAIT 0x20",
933+
.flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED,
934+
.exit_latency = 140,
935+
.target_residency = 420,
936+
.enter = &intel_idle,
937+
.enter_s2idle = intel_idle_s2idle, },
938+
{
939+
.name = "C10",
940+
.desc = "MWAIT 0x60",
941+
.flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,
942+
.exit_latency = 310,
943+
.target_residency = 930,
944+
.enter = &intel_idle,
945+
.enter_s2idle = intel_idle_s2idle, },
946+
{
947+
.enter = NULL }
948+
};
949+
921950
static struct cpuidle_state gmt_cstates[] __initdata = {
922951
{
923952
.name = "C1",
@@ -1410,6 +1439,10 @@ static const struct idle_cpu idle_cpu_adl_l __initconst = {
14101439
.state_table = adl_l_cstates,
14111440
};
14121441

1442+
static const struct idle_cpu idle_cpu_mtl_l __initconst = {
1443+
.state_table = mtl_l_cstates,
1444+
};
1445+
14131446
static const struct idle_cpu idle_cpu_gmt __initconst = {
14141447
.state_table = gmt_cstates,
14151448
};
@@ -1496,6 +1529,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
14961529
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &idle_cpu_icx),
14971530
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &idle_cpu_adl),
14981531
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &idle_cpu_adl_l),
1532+
X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, &idle_cpu_mtl_l),
14991533
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GRACEMONT, &idle_cpu_gmt),
15001534
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &idle_cpu_spr),
15011535
X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &idle_cpu_spr),

0 commit comments

Comments
 (0)