Skip to content

Commit 370406b

Browse files
dedekindrafaeljw
authored andcommitted
intel_idle: add Granite Rapids Xeon support
Add Granite Rapids Xeon C-states, which are C1, C1E, C6, and C6P. Comparing to previous Xeon Generations (e.g., Emerald Rapids), C6 requests end up only in core C6 state, and no package C-state promotion takes place even if all cores in the package are in core C6. C6P requests also end up in core C6, but if all cores have requested C6P, the SoC will enter the package C6 state. Signed-off-by: Artem Bityutskiy <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 47ac09b commit 370406b

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

drivers/idle/intel_idle.c

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,45 @@ static struct cpuidle_state spr_cstates[] __initdata = {
10221022
.enter = NULL }
10231023
};
10241024

1025+
static struct cpuidle_state gnr_cstates[] __initdata = {
1026+
{
1027+
.name = "C1",
1028+
.desc = "MWAIT 0x00",
1029+
.flags = MWAIT2flg(0x00),
1030+
.exit_latency = 1,
1031+
.target_residency = 1,
1032+
.enter = &intel_idle,
1033+
.enter_s2idle = intel_idle_s2idle, },
1034+
{
1035+
.name = "C1E",
1036+
.desc = "MWAIT 0x01",
1037+
.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
1038+
.exit_latency = 4,
1039+
.target_residency = 4,
1040+
.enter = &intel_idle,
1041+
.enter_s2idle = intel_idle_s2idle, },
1042+
{
1043+
.name = "C6",
1044+
.desc = "MWAIT 0x20",
1045+
.flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED |
1046+
CPUIDLE_FLAG_INIT_XSTATE,
1047+
.exit_latency = 170,
1048+
.target_residency = 650,
1049+
.enter = &intel_idle,
1050+
.enter_s2idle = intel_idle_s2idle, },
1051+
{
1052+
.name = "C6P",
1053+
.desc = "MWAIT 0x21",
1054+
.flags = MWAIT2flg(0x21) | CPUIDLE_FLAG_TLB_FLUSHED |
1055+
CPUIDLE_FLAG_INIT_XSTATE,
1056+
.exit_latency = 210,
1057+
.target_residency = 1000,
1058+
.enter = &intel_idle,
1059+
.enter_s2idle = intel_idle_s2idle, },
1060+
{
1061+
.enter = NULL }
1062+
};
1063+
10251064
static struct cpuidle_state atom_cstates[] __initdata = {
10261065
{
10271066
.name = "C1E",
@@ -1453,6 +1492,12 @@ static const struct idle_cpu idle_cpu_spr __initconst = {
14531492
.use_acpi = true,
14541493
};
14551494

1495+
static const struct idle_cpu idle_cpu_gnr __initconst = {
1496+
.state_table = gnr_cstates,
1497+
.disable_promotion_to_c1e = true,
1498+
.use_acpi = true,
1499+
};
1500+
14561501
static const struct idle_cpu idle_cpu_avn __initconst = {
14571502
.state_table = avn_cstates,
14581503
.disable_promotion_to_c1e = true,
@@ -1533,6 +1578,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
15331578
X86_MATCH_VFM(INTEL_ATOM_GRACEMONT, &idle_cpu_gmt),
15341579
X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, &idle_cpu_spr),
15351580
X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, &idle_cpu_spr),
1581+
X86_MATCH_VFM(INTEL_GRANITERAPIDS_X, &idle_cpu_gnr),
15361582
X86_MATCH_VFM(INTEL_XEON_PHI_KNL, &idle_cpu_knl),
15371583
X86_MATCH_VFM(INTEL_XEON_PHI_KNM, &idle_cpu_knl),
15381584
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT, &idle_cpu_bxt),

0 commit comments

Comments
 (0)