All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow selecting amd-pstate without CPU_SUP_INTEL
@ 2021-11-06 11:55 Stefano Picascia
  2021-11-08  9:13 ` Huang Rui
  0 siblings, 1 reply; 5+ messages in thread
From: Stefano Picascia @ 2021-11-06 11:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Huang Rui

Currently, even if selected, amd-pstate is not enabled unless
CPU_SUP_INTEL is also selected, due to ACPI_CPPC_LIB depending on
SCHED_MC_PRIO, which in turn depens on CPU_SUP_INTEL

The small patch below fixes it.


--- a/arch/x86/Kconfig	2021-10-31 20:53:10.000000000 +0000
+++ b/arch/x86/Kconfig	2021-11-06 09:22:46.736533394 +0000
@@ -1015,8 +1015,7 @@
 
 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 && (CPU_SUP_INTEL || CPU_SUP_AMD)
 	select CPU_FREQ
 	default y
 	help



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Allow selecting amd-pstate without CPU_SUP_INTEL
  2021-11-06 11:55 [PATCH] Allow selecting amd-pstate without CPU_SUP_INTEL Stefano Picascia
@ 2021-11-08  9:13 ` Huang Rui
  2021-11-08 10:01   ` Stefano Picascia
  0 siblings, 1 reply; 5+ messages in thread
From: Huang Rui @ 2021-11-08  9:13 UTC (permalink / raw)
  To: Stefano Picascia; +Cc: linux-kernel

On Sat, Nov 06, 2021 at 07:55:29PM +0800, Stefano Picascia wrote:
> Currently, even if selected, amd-pstate is not enabled unless
> CPU_SUP_INTEL is also selected, due to ACPI_CPPC_LIB depending on
> SCHED_MC_PRIO, which in turn depens on CPU_SUP_INTEL

Actually, amd-pstate driver doesn't depend on SCHED_MC_PRIO. I will clean
it up in my V3. Thanks.

Best Regards,
Ray

> 
> The small patch below fixes it.
> 
> 
> --- a/arch/x86/Kconfig	2021-10-31 20:53:10.000000000 +0000
> +++ b/arch/x86/Kconfig	2021-11-06 09:22:46.736533394 +0000
> @@ -1015,8 +1015,7 @@
>  
>  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 && (CPU_SUP_INTEL || CPU_SUP_AMD)
>  	select CPU_FREQ
>  	default y
>  	help
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Allow selecting amd-pstate without CPU_SUP_INTEL
  2021-11-08  9:13 ` Huang Rui
@ 2021-11-08 10:01   ` Stefano Picascia
  2021-11-09 14:19     ` Huang Rui
  0 siblings, 1 reply; 5+ messages in thread
From: Stefano Picascia @ 2021-11-08 10:01 UTC (permalink / raw)
  To: Huang Rui; +Cc: linux-kernel

On Mon, 2021-11-08 at 17:13 +0800, Huang Rui wrote:
> On Sat, Nov 06, 2021 at 07:55:29PM +0800, Stefano Picascia wrote:
> > Currently, even if selected, amd-pstate is not enabled unless
> > CPU_SUP_INTEL is also selected, due to ACPI_CPPC_LIB depending on
> > SCHED_MC_PRIO, which in turn depends on CPU_SUP_INTEL
> 
> Actually, amd-pstate driver doesn't depend on SCHED_MC_PRIO. 

amd-pstate doesn't depend on SCHED_MC_PRIO, but ACPI_CPPC_LIB is only
selected when SCHED_MC_PRIO is selected. I guess the issue can be fixed
in a better way, but currently if one compiles the kernel with
CPU_SUP_AMD, but without CPU_SUP_INTEL, ends up with a non functional
amd-pstate. 

Not a problem for distro kernels I guess, but I was puzzled as I wasn't
getting amd-pstate even with a supported processor.

Regards!


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Allow selecting amd-pstate without CPU_SUP_INTEL
  2021-11-08 10:01   ` Stefano Picascia
@ 2021-11-09 14:19     ` Huang Rui
  2021-11-10  9:12       ` Stefano Picascia
  0 siblings, 1 reply; 5+ messages in thread
From: Huang Rui @ 2021-11-09 14:19 UTC (permalink / raw)
  To: Stefano Picascia; +Cc: linux-kernel

O Mon, Nov 08, 2021 at 06:01:51PM +0800, Stefano Picascia wrote:
> On Mon, 2021-11-08 at 17:13 +0800, Huang Rui wrote:
> > On Sat, Nov 06, 2021 at 07:55:29PM +0800, Stefano Picascia wrote:
> > > Currently, even if selected, amd-pstate is not enabled unless
> > > CPU_SUP_INTEL is also selected, due to ACPI_CPPC_LIB depending on
> > > SCHED_MC_PRIO, which in turn depends on CPU_SUP_INTEL
> > 
> > Actually, amd-pstate driver doesn't depend on SCHED_MC_PRIO. 
> 
> amd-pstate doesn't depend on SCHED_MC_PRIO, but ACPI_CPPC_LIB is only
> selected when SCHED_MC_PRIO is selected. I guess the issue can be fixed
> in a better way, but currently if one compiles the kernel with
> CPU_SUP_AMD, but without CPU_SUP_INTEL, ends up with a non functional
> amd-pstate. 
> 
> Not a problem for distro kernels I guess, but I was puzzled as I wasn't
> getting amd-pstate even with a supported processor.
> 

If I modify the Kconfig of amd-pstate like below:

config X86_AMD_PSTATE
        bool "AMD Processor P-State driver"
        depends on X86
        select ACPI_PROCESSOR if ACPI
        select ACPI_CPPC_LIB if X86_64 && ACPI
        select CPU_FREQ_GOV_SCHEDUTIL if SMP

Then ACPI_CPPC_LIB can be selected by X86_AMD_PSTATE as well:

Symbol: ACPI_CPPC_LIB [=y]
Type  : bool

Defined at drivers/acpi/Kconfig:268
  Depends on: ACPI [=y] && ACPI_PROCESSOR [=y]
Selects: MAILBOX [=y] && PCC [=y]
Selected by [y]:
  - X86_AMD_PSTATE [=y] && CPU_FREQ [=y] && X86 [=y] && X86_64 [=y] && ACPI [=y]
Selected by [n]:
  - X86_INTEL_PSTATE [=n] && CPU_FREQ [=y] && X86 [=y] && X86_64 [=y] && ACPI [=y] && SCHED_MC_PRIO [=n]
  - ACPI_CPPC_CPUFREQ [=n] && CPU_FREQ [=y] && (ARM || ARM64) && ACPI_PROCESSOR [=y]

Did I miss anything?

Thanks,
Ray

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Allow selecting amd-pstate without CPU_SUP_INTEL
  2021-11-09 14:19     ` Huang Rui
@ 2021-11-10  9:12       ` Stefano Picascia
  0 siblings, 0 replies; 5+ messages in thread
From: Stefano Picascia @ 2021-11-10  9:12 UTC (permalink / raw)
  To: Huang Rui; +Cc: linux-kernel

On Tue, 2021-11-09 at 22:19 +0800, Huang Rui wrote:
> O Mon, Nov 08, 2021 at 06:01:51PM +0800, Stefano Picascia wrote:
> > On Mon, 2021-11-08 at 17:13 +0800, Huang Rui wrote:
> > > On Sat, Nov 06, 2021 at 07:55:29PM +0800, Stefano Picascia wrote:
> > > > Currently, even if selected, amd-pstate is not enabled unless
> > > > CPU_SUP_INTEL is also selected, due to ACPI_CPPC_LIB depending
> > > > on
> > > > SCHED_MC_PRIO, which in turn depends on CPU_SUP_INTEL
> > > 
> > > Actually, amd-pstate driver doesn't depend on SCHED_MC_PRIO. 
> > 
> > amd-pstate doesn't depend on SCHED_MC_PRIO, but ACPI_CPPC_LIB is
> > only
> > selected when SCHED_MC_PRIO is selected. I guess the issue can be
> > fixed
> > in a better way, but currently if one compiles the kernel with
> > CPU_SUP_AMD, but without CPU_SUP_INTEL, ends up with a non
> > functional
> > amd-pstate. 
> > 
> > Not a problem for distro kernels I guess, but I was puzzled as I
> > wasn't
> > getting amd-pstate even with a supported processor.
> > 
> 
> If I modify the Kconfig of amd-pstate like below:
> 
> config X86_AMD_PSTATE
>         bool "AMD Processor P-State driver"
>         depends on X86
>         select ACPI_PROCESSOR if ACPI
>         select ACPI_CPPC_LIB if X86_64 && ACPI
>         select CPU_FREQ_GOV_SCHEDUTIL if SMP
> 
> Then ACPI_CPPC_LIB can be selected by X86_AMD_PSTATE as well:
> 
> Symbol: ACPI_CPPC_LIB [=y]
> Type  : bool
> 
> Defined at drivers/acpi/Kconfig:268
>   Depends on: ACPI [=y] && ACPI_PROCESSOR [=y]
> Selects: MAILBOX [=y] && PCC [=y]
> Selected by [y]:
>   - X86_AMD_PSTATE [=y] && CPU_FREQ [=y] && X86 [=y] && X86_64 [=y]
> && ACPI [=y]
> Selected by [n]:
>   - X86_INTEL_PSTATE [=n] && CPU_FREQ [=y] && X86 [=y] && X86_64 [=y]
> && ACPI [=y] && SCHED_MC_PRIO [=n]
>   - ACPI_CPPC_CPUFREQ [=n] && CPU_FREQ [=y] && (ARM || ARM64) &&
> ACPI_PROCESSOR [=y]
> 
> Did I miss anything?


Works perfectly.
Thank you very much

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-10  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-06 11:55 [PATCH] Allow selecting amd-pstate without CPU_SUP_INTEL Stefano Picascia
2021-11-08  9:13 ` Huang Rui
2021-11-08 10:01   ` Stefano Picascia
2021-11-09 14:19     ` Huang Rui
2021-11-10  9:12       ` Stefano Picascia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.