linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM: Kconfig: fix unmet dependency for PM_SLEEP_SMP
@ 2021-03-21 20:18 Necip Fazil Yildiran
  2021-03-22 13:32 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Necip Fazil Yildiran @ 2021-03-21 20:18 UTC (permalink / raw)
  To: rjw
  Cc: rui.zhang, linux-pm, linux-kernel, paul, jeho, julianbraha,
	Necip Fazil Yildiran

When PM_SLEEP_SMP is enabled and HOTPLUG_CPU is disabled, it results in the
following Kbuild warning:

WARNING: unmet direct dependencies detected for HOTPLUG_CPU
  Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n])
  Selected by [y]:
  - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=n] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]

The reason is that PM_SLEEP_SMP selects HOTPLUG_CPU without depending on or
selecting HOTPLUG_CPU's dependencies.

Let PM_SLEEP_SMP depend on HOTPLUG_CPU instead to avoid Kbuild issues.

Signed-off-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
---
 kernel/power/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 6bfe3ead10ad..8b53c9b61347 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -125,7 +125,7 @@ config PM_SLEEP_SMP
 	depends on SMP
 	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
 	depends on PM_SLEEP
-	select HOTPLUG_CPU
+	depends on HOTPLUG_CPU
 
 config PM_SLEEP_SMP_NONZERO_CPU
 	def_bool y
-- 
2.25.1


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

* Re: [PATCH] PM: Kconfig: fix unmet dependency for PM_SLEEP_SMP
  2021-03-21 20:18 [PATCH] PM: Kconfig: fix unmet dependency for PM_SLEEP_SMP Necip Fazil Yildiran
@ 2021-03-22 13:32 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-03-22 13:32 UTC (permalink / raw)
  To: Necip Fazil Yildiran
  Cc: Rafael J. Wysocki, Zhang, Rui, Linux PM,
	Linux Kernel Mailing List, paul, jeho, julianbraha

On Sun, Mar 21, 2021 at 9:20 PM Necip Fazil Yildiran
<fazilyildiran@gmail.com> wrote:
>
> When PM_SLEEP_SMP is enabled and HOTPLUG_CPU is disabled, it results in the
> following Kbuild warning:
>
> WARNING: unmet direct dependencies detected for HOTPLUG_CPU
>   Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n])
>   Selected by [y]:
>   - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=n] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]
>
> The reason is that PM_SLEEP_SMP selects HOTPLUG_CPU without depending on or
> selecting HOTPLUG_CPU's dependencies.

This needs to be fixed.

HOTPLUG_CPU needs to be selected automatically by PM_SLEEP_SMP as it is now.

> Let PM_SLEEP_SMP depend on HOTPLUG_CPU instead to avoid Kbuild issues.
>
> Signed-off-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
> ---
>  kernel/power/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> index 6bfe3ead10ad..8b53c9b61347 100644
> --- a/kernel/power/Kconfig
> +++ b/kernel/power/Kconfig
> @@ -125,7 +125,7 @@ config PM_SLEEP_SMP
>         depends on SMP
>         depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
>         depends on PM_SLEEP
> -       select HOTPLUG_CPU
> +       depends on HOTPLUG_CPU
>
>  config PM_SLEEP_SMP_NONZERO_CPU
>         def_bool y
> --
> 2.25.1
>

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

end of thread, other threads:[~2021-03-22 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-21 20:18 [PATCH] PM: Kconfig: fix unmet dependency for PM_SLEEP_SMP Necip Fazil Yildiran
2021-03-22 13:32 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).