diff mbox series

intel_idle: Add Comet Lake support

Message ID 20200227013411.1.Ica3bb9fa898499d94e0b0a2bfa08ec46c89d84fa@changeid (mailing list archive)
State Changes Requested, archived
Headers show
Series intel_idle: Add Comet Lake support | expand

Commit Message

Harry Pan Feb. 26, 2020, 5:34 p.m. UTC
Add Comet Lake ID to enable intel_idle driver support.
This is required for PC10 and S0ix.

Signed-off-by: Harry Pan <harry.pan@intel.com>

---

 drivers/idle/intel_idle.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rafael J. Wysocki Feb. 26, 2020, 9:47 p.m. UTC | #1
On Wed, Feb 26, 2020 at 6:34 PM Harry Pan <harry.pan@intel.com> wrote:
>
> Add Comet Lake ID to enable intel_idle driver support.
> This is required for PC10 and S0ix.

That shouldn't be the case for Linux 5.6-rc as long as the ACPI tables
expose C10 in _CST, so have you checked that?

> Signed-off-by: Harry Pan <harry.pan@intel.com>
>
> ---
>
>  drivers/idle/intel_idle.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 347b08b56042..3cf292b2b7f1 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -1086,6 +1086,8 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
>         INTEL_CPU_FAM6(KABYLAKE_L,              idle_cpu_skl),
>         INTEL_CPU_FAM6(KABYLAKE,                idle_cpu_skl),
>         INTEL_CPU_FAM6(SKYLAKE_X,               idle_cpu_skx),
> +       INTEL_CPU_FAM6(COMETLAKE_L,             idle_cpu_skl),
> +       INTEL_CPU_FAM6(COMETLAKE,               idle_cpu_skl),
>         INTEL_CPU_FAM6(XEON_PHI_KNL,            idle_cpu_knl),
>         INTEL_CPU_FAM6(XEON_PHI_KNM,            idle_cpu_knl),
>         INTEL_CPU_FAM6(ATOM_GOLDMONT,           idle_cpu_bxt),
> --
> 2.24.1
>
Rafael J. Wysocki Feb. 27, 2020, 10:56 a.m. UTC | #2
On Wed, Feb 26, 2020 at 10:47 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Wed, Feb 26, 2020 at 6:34 PM Harry Pan <harry.pan@intel.com> wrote:
> >
> > Add Comet Lake ID to enable intel_idle driver support.
> > This is required for PC10 and S0ix.
>
> That shouldn't be the case for Linux 5.6-rc as long as the ACPI tables
> expose C10 in _CST, so have you checked that?

Regardless of that (which only is about the changelog), I wouldn't
just use idle_cpu_skl directly for CML like in the patch below.

Instead, I'd define something like

static const struct idle_cpu idle_cpu_cml __initconst = {
    .state_table = skl_cstates,
    .disable_promotion_to_c1e = true,
    .use_acpi = true,
};

and point  to it from the CML entries in intel_idle_ids[].

That would allow the driver to avoid enabling the C-states that are
not exposed in the ACPI tables by default which generally is safer
than exposing all of them for all CML platforms unconditionally.

> > Signed-off-by: Harry Pan <harry.pan@intel.com>
> >
> > ---
> >
> >  drivers/idle/intel_idle.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> > index 347b08b56042..3cf292b2b7f1 100644
> > --- a/drivers/idle/intel_idle.c
> > +++ b/drivers/idle/intel_idle.c
> > @@ -1086,6 +1086,8 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
> >         INTEL_CPU_FAM6(KABYLAKE_L,              idle_cpu_skl),
> >         INTEL_CPU_FAM6(KABYLAKE,                idle_cpu_skl),
> >         INTEL_CPU_FAM6(SKYLAKE_X,               idle_cpu_skx),
> > +       INTEL_CPU_FAM6(COMETLAKE_L,             idle_cpu_skl),
> > +       INTEL_CPU_FAM6(COMETLAKE,               idle_cpu_skl),

+       INTEL_CPU_FAM6(COMETLAKE_L,             idle_cpu_cml),
+       INTEL_CPU_FAM6(COMETLAKE,               idle_cpu_cml),

> >         INTEL_CPU_FAM6(XEON_PHI_KNL,            idle_cpu_knl),
> >         INTEL_CPU_FAM6(XEON_PHI_KNM,            idle_cpu_knl),
> >         INTEL_CPU_FAM6(ATOM_GOLDMONT,           idle_cpu_bxt),
> > --
> > 2.24.1
> >
diff mbox series

Patch

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 347b08b56042..3cf292b2b7f1 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1086,6 +1086,8 @@  static const struct x86_cpu_id intel_idle_ids[] __initconst = {
 	INTEL_CPU_FAM6(KABYLAKE_L,		idle_cpu_skl),
 	INTEL_CPU_FAM6(KABYLAKE,		idle_cpu_skl),
 	INTEL_CPU_FAM6(SKYLAKE_X,		idle_cpu_skx),
+	INTEL_CPU_FAM6(COMETLAKE_L,		idle_cpu_skl),
+	INTEL_CPU_FAM6(COMETLAKE,		idle_cpu_skl),
 	INTEL_CPU_FAM6(XEON_PHI_KNL,		idle_cpu_knl),
 	INTEL_CPU_FAM6(XEON_PHI_KNM,		idle_cpu_knl),
 	INTEL_CPU_FAM6(ATOM_GOLDMONT,		idle_cpu_bxt),