mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 07:44:21 +08:00
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 <kai.heng.feng@canonical.com> Link: https://patch.msgid.link/20240820041128.102452-1-kai.heng.feng@canonical.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
370406bf57
commit
5bb33212b5
@ -1520,6 +1520,10 @@ static const struct idle_cpu idle_cpu_dnv __initconst = {
|
|||||||
.use_acpi = true,
|
.use_acpi = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct idle_cpu idle_cpu_tmt __initconst = {
|
||||||
|
.disable_promotion_to_c1e = true,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct idle_cpu idle_cpu_snr __initconst = {
|
static const struct idle_cpu idle_cpu_snr __initconst = {
|
||||||
.state_table = snr_cstates,
|
.state_table = snr_cstates,
|
||||||
.disable_promotion_to_c1e = true,
|
.disable_promotion_to_c1e = true,
|
||||||
@ -1584,6 +1588,8 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
|
|||||||
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT, &idle_cpu_bxt),
|
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT, &idle_cpu_bxt),
|
||||||
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_PLUS, &idle_cpu_bxt),
|
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_PLUS, &idle_cpu_bxt),
|
||||||
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_D, &idle_cpu_dnv),
|
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_D, &idle_cpu_dnv),
|
||||||
|
X86_MATCH_VFM(INTEL_ATOM_TREMONT, &idle_cpu_tmt),
|
||||||
|
X86_MATCH_VFM(INTEL_ATOM_TREMONT_L, &idle_cpu_tmt),
|
||||||
X86_MATCH_VFM(INTEL_ATOM_TREMONT_D, &idle_cpu_snr),
|
X86_MATCH_VFM(INTEL_ATOM_TREMONT_D, &idle_cpu_snr),
|
||||||
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, &idle_cpu_grr),
|
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, &idle_cpu_grr),
|
||||||
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, &idle_cpu_srf),
|
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)
|
|||||||
|
|
||||||
drv->state_count = 1;
|
drv->state_count = 1;
|
||||||
|
|
||||||
if (icpu)
|
if (icpu && icpu->state_table)
|
||||||
intel_idle_init_cstates_icpu(drv);
|
intel_idle_init_cstates_icpu(drv);
|
||||||
else
|
else
|
||||||
intel_idle_init_cstates_acpi(drv);
|
intel_idle_init_cstates_acpi(drv);
|
||||||
@ -2255,7 +2261,11 @@ static int __init intel_idle_init(void)
|
|||||||
|
|
||||||
icpu = (const struct idle_cpu *)id->driver_data;
|
icpu = (const struct idle_cpu *)id->driver_data;
|
||||||
if (icpu) {
|
if (icpu) {
|
||||||
|
if (icpu->state_table)
|
||||||
cpuidle_state_table = icpu->state_table;
|
cpuidle_state_table = icpu->state_table;
|
||||||
|
else if (!intel_idle_acpi_cst_extract())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
auto_demotion_disable_flags = icpu->auto_demotion_disable_flags;
|
auto_demotion_disable_flags = icpu->auto_demotion_disable_flags;
|
||||||
if (icpu->disable_promotion_to_c1e)
|
if (icpu->disable_promotion_to_c1e)
|
||||||
c1e_promotion = C1E_PROMOTION_DISABLE;
|
c1e_promotion = C1E_PROMOTION_DISABLE;
|
||||||
|
Loading…
Reference in New Issue
Block a user