Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,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, },
Comment on lines +983 to +984
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary & in function-pointer initializer: throughout this file .enter is set as intel_idle (without &). Please change this to intel_idle to match existing style and avoid checkpatch warnings.

Copilot uses AI. Check for mistakes.
{
.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, },
Comment on lines +991 to +992
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary & in function-pointer initializer: throughout this file .enter is set as intel_idle (without &). Please change this to intel_idle to match existing style and avoid checkpatch warnings.

Copilot uses AI. Check for mistakes.
{
.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, },
Comment on lines +999 to +1000
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary & in function-pointer initializer: throughout this file .enter is set as intel_idle (without &). Please change this to intel_idle to match existing style and avoid checkpatch warnings.

Copilot uses AI. Check for mistakes.
{
.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, },
Comment on lines +1007 to +1008
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary & in function-pointer initializer: throughout this file .enter is set as intel_idle (without &). Please change this to intel_idle to match existing style and avoid checkpatch warnings.

Copilot uses AI. Check for mistakes.
{
.enter = NULL }
};

static struct cpuidle_state gmt_cstates[] __initdata = {
{
.name = "C1",
Expand Down Expand Up @@ -1551,6 +1588,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,
};
Expand Down Expand Up @@ -1659,6 +1700,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),
Comment on lines 1701 to +1703
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming is inconsistent with the existing pattern for *_L model IDs in this file: INTEL_ALDERLAKE_L maps to idle_cpu_adl_l and INTEL_METEORLAKE_L maps to idle_cpu_mtl_l, but INTEL_PANTHERLAKE_L maps to idle_cpu_ptl. Consider renaming the new table/struct to ptl_l_* (or similar) so it’s clear this is specific to the _L variant and stays consistent with nearby entries.

Copilot uses AI. Check for mistakes.
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),
Expand Down
Loading