Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

intel_idle: add Granite Rapids Xeon D support

Add Granite Rapids Xeon D C-states support: C1, C1E, C6, and C6P.

The C-states are basically the same as in Granite Rapids Xeon SP/AP, but
characteristics (latency, target residency) are a bit different.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Link: https://patch.msgid.link/20241107115608.52233-1-artem.bityutskiy@linux.intel.com
[ rjw: Changelog edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Artem Bityutskiy and committed by
Rafael J. Wysocki
f557e0d1 ee702fda

+48
+48
drivers/idle/intel_idle.c
··· 1069 1069 .enter = NULL } 1070 1070 }; 1071 1071 1072 + static struct cpuidle_state gnrd_cstates[] __initdata = { 1073 + { 1074 + .name = "C1", 1075 + .desc = "MWAIT 0x00", 1076 + .flags = MWAIT2flg(0x00), 1077 + .exit_latency = 1, 1078 + .target_residency = 1, 1079 + .enter = &intel_idle, 1080 + .enter_s2idle = intel_idle_s2idle, }, 1081 + { 1082 + .name = "C1E", 1083 + .desc = "MWAIT 0x01", 1084 + .flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE, 1085 + .exit_latency = 4, 1086 + .target_residency = 4, 1087 + .enter = &intel_idle, 1088 + .enter_s2idle = intel_idle_s2idle, }, 1089 + { 1090 + .name = "C6", 1091 + .desc = "MWAIT 0x20", 1092 + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED | 1093 + CPUIDLE_FLAG_INIT_XSTATE | 1094 + CPUIDLE_FLAG_PARTIAL_HINT_MATCH, 1095 + .exit_latency = 220, 1096 + .target_residency = 650, 1097 + .enter = &intel_idle, 1098 + .enter_s2idle = intel_idle_s2idle, }, 1099 + { 1100 + .name = "C6P", 1101 + .desc = "MWAIT 0x21", 1102 + .flags = MWAIT2flg(0x21) | CPUIDLE_FLAG_TLB_FLUSHED | 1103 + CPUIDLE_FLAG_INIT_XSTATE | 1104 + CPUIDLE_FLAG_PARTIAL_HINT_MATCH, 1105 + .exit_latency = 240, 1106 + .target_residency = 750, 1107 + .enter = &intel_idle, 1108 + .enter_s2idle = intel_idle_s2idle, }, 1109 + { 1110 + .enter = NULL } 1111 + }; 1112 + 1072 1113 static struct cpuidle_state atom_cstates[] __initdata = { 1073 1114 { 1074 1115 .name = "C1E", ··· 1549 1508 .use_acpi = true, 1550 1509 }; 1551 1510 1511 + static const struct idle_cpu idle_cpu_gnrd __initconst = { 1512 + .state_table = gnrd_cstates, 1513 + .disable_promotion_to_c1e = true, 1514 + .use_acpi = true, 1515 + }; 1516 + 1552 1517 static const struct idle_cpu idle_cpu_avn __initconst = { 1553 1518 .state_table = avn_cstates, 1554 1519 .disable_promotion_to_c1e = true, ··· 1640 1593 X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, &idle_cpu_spr), 1641 1594 X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, &idle_cpu_spr), 1642 1595 X86_MATCH_VFM(INTEL_GRANITERAPIDS_X, &idle_cpu_gnr), 1596 + X86_MATCH_VFM(INTEL_GRANITERAPIDS_D, &idle_cpu_gnrd), 1643 1597 X86_MATCH_VFM(INTEL_XEON_PHI_KNL, &idle_cpu_knl), 1644 1598 X86_MATCH_VFM(INTEL_XEON_PHI_KNM, &idle_cpu_knl), 1645 1599 X86_MATCH_VFM(INTEL_ATOM_GOLDMONT, &idle_cpu_bxt),