diff mbox series

intel_idle: add support for Intel Raptorlake

Message ID 20230208163934.6119-1-hagen@jauu.net
State New
Headers show
Series intel_idle: add support for Intel Raptorlake | expand

Commit Message

Hagen Paul Pfeifer Feb. 8, 2023, 4:39 p.m. UTC
RPL misses Intel Idle (C State) support and ACPI is used as an fallback.
The mircoarchitecture between ADL and RPL does not differ on the power
management critical aspects, so ADL can be used as a base at this point.

Before:

  $ grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
  /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
  /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1_ACPI
  /sys/devices/system/cpu/cpu0/cpuidle/state2/name:C2_ACPI
  /sys/devices/system/cpu/cpu0/cpuidle/state3/name:C3_ACPI

After:

  grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
  /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
  /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1E
  /sys/devices/system/cpu/cpu0/cpuidle/state2/name:C6
  /sys/devices/system/cpu/cpu0/cpuidle/state3/name:C8
  /sys/devices/system/cpu/cpu0/cpuidle/state4/name:C10

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Vinay Kumar <vinay.kumar@intel.com>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---

I skipped RAPTORLAKE_P and RAPTORLAKE_S lineup support - just because of
missing testing capability. But can be added and will be (implicitly)
tested by -rcX users during merge window. Can be cooked in a v2?!
---
 drivers/idle/intel_idle.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Zhang Rui Feb. 10, 2023, 10:26 a.m. UTC | #1
Hi,

On Wed, 2023-02-08 at 17:39 +0100, Hagen Paul Pfeifer wrote:
> RPL misses Intel Idle (C State) support and ACPI is used as an
> fallback.
> The mircoarchitecture between ADL and RPL does not differ on the
> power
> management critical aspects, so ADL can be used as a base at this
> point.
> 
Please see my reply here
https://lore.kernel.org/all/e11f89efc67ec90ba1fed21bbfeb4af8764119e9.camel@intel.com/

And FYI, I may have some update on RPL intel_idle support later.

thanks,
rui

> Before:
> 
>   $ grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
>   /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
>   /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1_ACPI
>   /sys/devices/system/cpu/cpu0/cpuidle/state2/name:C2_ACPI
>   /sys/devices/system/cpu/cpu0/cpuidle/state3/name:C3_ACPI
> 
> After:
> 
>   grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
>   /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
>   /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1E
>   /sys/devices/system/cpu/cpu0/cpuidle/state2/name:C6
>   /sys/devices/system/cpu/cpu0/cpuidle/state3/name:C8
>   /sys/devices/system/cpu/cpu0/cpuidle/state4/name:C10
> 
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Vinay Kumar <vinay.kumar@intel.com>
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
> ---
> 
> I skipped RAPTORLAKE_P and RAPTORLAKE_S lineup support - just because
> of
> missing testing capability. But can be added and will be (implicitly)
> tested by -rcX users during merge window. Can be cooked in a v2?!
> ---
>  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 cfeb24d40d37..d1a88dfdbc53 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -1436,6 +1436,7 @@ static const struct x86_cpu_id intel_idle_ids[]
> __initconst = {
>  	X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_PLUS,	&idle_cpu_bxt
> ),
>  	X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_D,	&idle_cpu_dnv
> ),
>  	X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D,	&idle_cpu_snr
> ),
> +	X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,		&idle_cpu_adl
> ),
>  	{}
>  };
>  
> @@ -1867,6 +1868,7 @@ static void __init
> intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
>  	case INTEL_FAM6_ALDERLAKE:
>  	case INTEL_FAM6_ALDERLAKE_L:
>  	case INTEL_FAM6_ALDERLAKE_N:
> +	case INTEL_FAM6_RAPTORLAKE:
>  		adl_idle_state_table_update();
>  		break;
>  	}
diff mbox series

Patch

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index cfeb24d40d37..d1a88dfdbc53 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1436,6 +1436,7 @@  static const struct x86_cpu_id intel_idle_ids[] __initconst = {
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_PLUS,	&idle_cpu_bxt),
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_D,	&idle_cpu_dnv),
 	X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D,	&idle_cpu_snr),
+	X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,		&idle_cpu_adl),
 	{}
 };
 
@@ -1867,6 +1868,7 @@  static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
 	case INTEL_FAM6_ALDERLAKE:
 	case INTEL_FAM6_ALDERLAKE_L:
 	case INTEL_FAM6_ALDERLAKE_N:
+	case INTEL_FAM6_RAPTORLAKE:
 		adl_idle_state_table_update();
 		break;
 	}