Skip to content

Commit 5bb3321

Browse files
khfengrafaeljw
authored andcommitted
intel_idle: Disable promotion to C1E on Jasper Lake and Elkhart Lake
PCIe ethernet throughut is sub-optimal on Jasper Lake and Elkhart Lake. The CPU can take long time to exit to C0 to handle IRQ and perform DMA when C1E has been entered. For this reason, adjust intel_idle to disable promotion to C1E and still use C-states from ACPI _CST on those two platforms. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219023 Signed-off-by: Kai-Heng Feng <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 370406b commit 5bb3321

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

drivers/idle/intel_idle.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,10 @@ static const struct idle_cpu idle_cpu_dnv __initconst = {
15201520
.use_acpi = true,
15211521
};
15221522

1523+
static const struct idle_cpu idle_cpu_tmt __initconst = {
1524+
.disable_promotion_to_c1e = true,
1525+
};
1526+
15231527
static const struct idle_cpu idle_cpu_snr __initconst = {
15241528
.state_table = snr_cstates,
15251529
.disable_promotion_to_c1e = true,
@@ -1584,6 +1588,8 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
15841588
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT, &idle_cpu_bxt),
15851589
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_PLUS, &idle_cpu_bxt),
15861590
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_D, &idle_cpu_dnv),
1591+
X86_MATCH_VFM(INTEL_ATOM_TREMONT, &idle_cpu_tmt),
1592+
X86_MATCH_VFM(INTEL_ATOM_TREMONT_L, &idle_cpu_tmt),
15871593
X86_MATCH_VFM(INTEL_ATOM_TREMONT_D, &idle_cpu_snr),
15881594
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, &idle_cpu_grr),
15891595
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, &idle_cpu_srf),
@@ -2121,7 +2127,7 @@ static void __init intel_idle_cpuidle_driver_init(struct cpuidle_driver *drv)
21212127

21222128
drv->state_count = 1;
21232129

2124-
if (icpu)
2130+
if (icpu && icpu->state_table)
21252131
intel_idle_init_cstates_icpu(drv);
21262132
else
21272133
intel_idle_init_cstates_acpi(drv);
@@ -2255,7 +2261,11 @@ static int __init intel_idle_init(void)
22552261

22562262
icpu = (const struct idle_cpu *)id->driver_data;
22572263
if (icpu) {
2258-
cpuidle_state_table = icpu->state_table;
2264+
if (icpu->state_table)
2265+
cpuidle_state_table = icpu->state_table;
2266+
else if (!intel_idle_acpi_cst_extract())
2267+
return -ENODEV;
2268+
22592269
auto_demotion_disable_flags = icpu->auto_demotion_disable_flags;
22602270
if (icpu->disable_promotion_to_c1e)
22612271
c1e_promotion = C1E_PROMOTION_DISABLE;

0 commit comments

Comments
 (0)