[V11,1/7] x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the expansion.

Message ID 20231129065437.290183-2-li.meng@amd.com
State New
Headers
Series amd-pstate preferred core |

Commit Message

Meng Li Nov. 29, 2023, 6:54 a.m. UTC
  amd-pstate driver also uses SCHED_MC_PRIO, so decouple the requirement
of CPU_SUP_INTEL from the dependencies to allow compilation in kernels
without Intel CPU support.

Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Meng Li <li.meng@amd.com>
---
 arch/x86/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Yuan, Perry Nov. 30, 2023, 6 a.m. UTC | #1
[AMD Official Use Only - General]

> -----Original Message-----
> From: Meng, Li (Jassmine) <Li.Meng@amd.com>
> Sent: Wednesday, November 29, 2023 2:55 PM
> To: Rafael J . Wysocki <rafael.j.wysocki@intel.com>; Huang, Ray
> <Ray.Huang@amd.com>
> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; x86@kernel.org;
> linux-acpi@vger.kernel.org; Shuah Khan <skhan@linuxfoundation.org>; linux-
> kselftest@vger.kernel.org; Fontenot, Nathan <Nathan.Fontenot@amd.com>;
> Sharma, Deepak <Deepak.Sharma@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Limonciello, Mario
> <Mario.Limonciello@amd.com>; Huang, Shimmer <Shimmer.Huang@amd.com>;
> Yuan, Perry <Perry.Yuan@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>;
> Viresh Kumar <viresh.kumar@linaro.org>; Borislav Petkov <bp@alien8.de>;
> Oleksandr Natalenko <oleksandr@natalenko.name>; Meng, Li (Jassmine)
> <Li.Meng@amd.com>
> Subject: [PATCH V11 1/7] x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for
> the expansion.
>
> amd-pstate driver also uses SCHED_MC_PRIO, so decouple the requirement of
> CPU_SUP_INTEL from the dependencies to allow compilation in kernels without
> Intel CPU support.
>
> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> Reviewed-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: Meng Li <li.meng@amd.com>
> ---
>  arch/x86/Kconfig | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index
> ad478a2b49e2..77b1af90f7a2 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1054,8 +1054,9 @@ config SCHED_MC
>
>  config SCHED_MC_PRIO
>       bool "CPU core priorities scheduler support"
> -     depends on SCHED_MC && CPU_SUP_INTEL
> -     select X86_INTEL_PSTATE
> +     depends on SCHED_MC
> +     select X86_INTEL_PSTATE if CPU_SUP_INTEL
> +     select X86_AMD_PSTATE if CPU_SUP_AMD && ACPI
>       select CPU_FREQ
>       default y
>       help
> --
> 2.34.1

Reviewed-by: Perry Yuan <perry.yuan@amd.com >
  

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ad478a2b49e2..77b1af90f7a2 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1054,8 +1054,9 @@  config SCHED_MC
 
 config SCHED_MC_PRIO
 	bool "CPU core priorities scheduler support"
-	depends on SCHED_MC && CPU_SUP_INTEL
-	select X86_INTEL_PSTATE
+	depends on SCHED_MC
+	select X86_INTEL_PSTATE if CPU_SUP_INTEL
+	select X86_AMD_PSTATE if CPU_SUP_AMD && ACPI
 	select CPU_FREQ
 	default y
 	help