public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] intel_idle: Drop C-states redundant when PC6 is disabled
@ 2026-04-25  7:25 Artem Bityutskiy
  2026-04-25  7:25 ` [PATCH 1/3] intel_idle: Add constants for MSR_PKG_CST_CONFIG_CONTROL Artem Bityutskiy
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2026-04-25  7:25 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linux PM Mailing List

From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

This patch series drops redundant requestable C-states when PC6 is disabled in
BIOS. For example, Granite Rapids Xeon has two C6 flavors: C6 and C6P. C6
allows only core C6 (CC6), while C6P allows both CC6 and package C6 (PC6).
When PC6 is disabled, C6P becomes identical to C6 and is therefore redundant.
Refer to patch 3 for the full rationale and details.

Patches 1 and 2 prepare the code for patch 3. They introduce no functional
changes, only restructure it to improve readability and maintainability.

For more information about Granite Rapids C6 vs C6P, refer to this article:
https://github.com/intel/pepc/blob/main/docs/misc-c6p-c6sp.md

Thanks, Artem.

Artem Bityutskiy (3):
  intel_idle: Add constants for MSR_PKG_CST_CONFIG_CONTROL
  intel_idle: Introduce a helper for checking PC6
  intel_idle: Drop C-states redundant when PC6 is disabled

 drivers/idle/intel_idle.c | 104 +++++++++++++++++++++++++++++---------
 1 file changed, 81 insertions(+), 23 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] intel_idle: Add Panther Lake C-states table
@ 2026-03-09  8:38 Artem Bityutskiy
  2026-03-11 11:55 ` Rafael J. Wysocki
  0 siblings, 1 reply; 8+ messages in thread
From: Artem Bityutskiy @ 2026-03-09  8:38 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linux PM Mailing List, Artem Bityutskiy

From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

Panther Lake supports the following requestable C-states: C1, C1E, C6S, C10.
Add a custom table for them.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 drivers/idle/intel_idle.c | 42 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Based on latency analysis using the 'wult' tool, and power break even
analysis using the 'pbe' tool.

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 167eb72105baf..36f5766381172 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -994,6 +994,43 @@ static struct cpuidle_state mtl_l_cstates[] __initdata = {
 		.enter = NULL }
 };
 
+static struct cpuidle_state ptl_cstates[] __initdata = {
+	{
+		.name = "C1",
+		.desc = "MWAIT 0x00",
+		.flags = MWAIT2flg(0x00),
+		.exit_latency = 1,
+		.target_residency = 1,
+		.enter = &intel_idle,
+		.enter_s2idle = intel_idle_s2idle, },
+	{
+		.name = "C1E",
+		.desc = "MWAIT 0x01",
+		.flags = MWAIT2flg(0x01) | CPUIDLE_FLAG_ALWAYS_ENABLE,
+		.exit_latency = 10,
+		.target_residency = 10,
+		.enter = &intel_idle,
+		.enter_s2idle = intel_idle_s2idle, },
+	{
+		.name = "C6S",
+		.desc = "MWAIT 0x21",
+		.flags = MWAIT2flg(0x21) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 300,
+		.target_residency = 300,
+		.enter = &intel_idle,
+		.enter_s2idle = intel_idle_s2idle, },
+	{
+		.name = "C10",
+		.desc = "MWAIT 0x60",
+		.flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 370,
+		.target_residency = 2500,
+		.enter = &intel_idle,
+		.enter_s2idle = intel_idle_s2idle, },
+	{
+		.enter = NULL }
+};
+
 static struct cpuidle_state gmt_cstates[] __initdata = {
 	{
 		.name = "C1",
@@ -1623,6 +1660,10 @@ static const struct idle_cpu idle_cpu_mtl_l __initconst = {
 	.state_table = mtl_l_cstates,
 };
 
+static const struct idle_cpu idle_cpu_ptl __initconst = {
+	.state_table = ptl_cstates,
+};
+
 static const struct idle_cpu idle_cpu_gmt __initconst = {
 	.state_table = gmt_cstates,
 };
@@ -1737,6 +1778,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
 	X86_MATCH_VFM(INTEL_ALDERLAKE,		&idle_cpu_adl),
 	X86_MATCH_VFM(INTEL_ALDERLAKE_L,	&idle_cpu_adl_l),
 	X86_MATCH_VFM(INTEL_METEORLAKE_L,	&idle_cpu_mtl_l),
+	X86_MATCH_VFM(INTEL_PANTHERLAKE_L,	&idle_cpu_ptl),
 	X86_MATCH_VFM(INTEL_ATOM_GRACEMONT,	&idle_cpu_gmt),
 	X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X,	&idle_cpu_spr),
 	X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X,	&idle_cpu_spr),
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-04-25  7:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-25  7:25 [PATCH 0/3] intel_idle: Drop C-states redundant when PC6 is disabled Artem Bityutskiy
2026-04-25  7:25 ` [PATCH 1/3] intel_idle: Add constants for MSR_PKG_CST_CONFIG_CONTROL Artem Bityutskiy
2026-04-25  7:25 ` [PATCH] intel_idle: Add Panther Lake C-states table Artem Bityutskiy
2026-04-25  7:27   ` Artem Bityutskiy
2026-04-25  7:25 ` [PATCH 2/3] intel_idle: Introduce a helper for checking PC6 Artem Bityutskiy
2026-04-25  7:25 ` [PATCH 3/3] intel_idle: Drop C-states redundant when PC6 is disabled Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2026-03-09  8:38 [PATCH] intel_idle: Add Panther Lake C-states table Artem Bityutskiy
2026-03-11 11:55 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox