mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PM: sleep: only allow relevant powerpc platforms to enable PM_SLEEP_SMP
@ 2026-09-09 17:05 Julian Braha
  2026-09-11  8:44 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Julian Braha @ 2026-09-09 17:05 UTC (permalink / raw)
  To: rafael; +Cc: lenb, pavel, akpm, linux-pm, linux-kernel, Julian Braha

PM_SLEEP_SMP selects HOTPLUG_CPU, but on some powerpc platforms, this
creates an unmet dependency such as:

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 [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]

because HOTPLUG_CPU is only available on powerpc platforms IBM pSeries and
PowerNV, Apple PowerMac, and Freescale Book-E.

For powerpc, let's ensure that PM_SLEEP_SMP can only be enabled on those
systems that support HOTPLUG_CPU.

Fixes: f3de4be9d5f8 ("PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION")
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 kernel/power/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 71165e7f04f4..7cb6495ffaa0 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -146,6 +146,7 @@ config PM_SLEEP_SMP
 	def_bool y
 	depends on SMP
 	depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
+	depends on PPC_PSERIES || PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE if PPC
 	depends on PM_SLEEP
 	select HOTPLUG_CPU
 
-- 
2.55.0


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

* Re: [PATCH] PM: sleep: only allow relevant powerpc platforms to enable PM_SLEEP_SMP
  2026-09-09 17:05 [PATCH] PM: sleep: only allow relevant powerpc platforms to enable PM_SLEEP_SMP Julian Braha
@ 2026-09-11  8:44 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-09-11  8:44 UTC (permalink / raw)
  To: Julian Braha, rafael
  Cc: oe-kbuild-all, lenb, pavel, akpm, linux-pm, linux-kernel, Julian Braha

Hi Julian,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v7.3-rc2 next-20260909]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Julian-Braha/PM-sleep-only-allow-relevant-powerpc-platforms-to-enable-PM_SLEEP_SMP/20260909-180520
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20260909170520.553867-1-julianbraha%40gmail.com
patch subject: [PATCH] PM: sleep: only allow relevant powerpc platforms to enable PM_SLEEP_SMP
config: i386-randconfig-062-20260910 (https://download.01.org/0day-ci/archive/20260911/202609111618.fkJkvb2m-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260911/202609111618.fkJkvb2m-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609111618.fkJkvb2m-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/x86/power/cpu.c: In function 'hibernate_resume_nonboot_cpu_disable':
>> arch/x86/power/cpu.c:338:15: error: implicit declaration of function 'freeze_secondary_cpus'; did you mean 'thaw_secondary_cpus'? [-Wimplicit-function-declaration]
     338 |         ret = freeze_secondary_cpus(0);
         |               ^~~~~~~~~~~~~~~~~~~~~
         |               thaw_secondary_cpus


vim +338 arch/x86/power/cpu.c

406f992e4a372da Rafael J. Wysocki 2016-07-14  312  
406f992e4a372da Rafael J. Wysocki 2016-07-14  313  int hibernate_resume_nonboot_cpu_disable(void)
406f992e4a372da Rafael J. Wysocki 2016-07-14  314  {
406f992e4a372da Rafael J. Wysocki 2016-07-14  315  	void (*play_dead)(void) = smp_ops.play_dead;
406f992e4a372da Rafael J. Wysocki 2016-07-14  316  	int ret;
406f992e4a372da Rafael J. Wysocki 2016-07-14  317  
406f992e4a372da Rafael J. Wysocki 2016-07-14  318  	/*
406f992e4a372da Rafael J. Wysocki 2016-07-14  319  	 * Ensure that MONITOR/MWAIT will not be used in the "play dead" loop
406f992e4a372da Rafael J. Wysocki 2016-07-14  320  	 * during hibernate image restoration, because it is likely that the
406f992e4a372da Rafael J. Wysocki 2016-07-14  321  	 * monitored address will be actually written to at that time and then
406f992e4a372da Rafael J. Wysocki 2016-07-14  322  	 * the "dead" CPU will attempt to execute instructions again, but the
406f992e4a372da Rafael J. Wysocki 2016-07-14  323  	 * address in its instruction pointer may not be possible to resolve
406f992e4a372da Rafael J. Wysocki 2016-07-14  324  	 * any more at that point (the page tables used by it previously may
406f992e4a372da Rafael J. Wysocki 2016-07-14  325  	 * have been overwritten by hibernate image data).
ec527c318036a65 Jiri Kosina       2019-05-30  326  	 *
ec527c318036a65 Jiri Kosina       2019-05-30  327  	 * First, make sure that we wake up all the potentially disabled SMT
ec527c318036a65 Jiri Kosina       2019-05-30  328  	 * threads which have been initially brought up and then put into
ec527c318036a65 Jiri Kosina       2019-05-30  329  	 * mwait/cpuidle sleep.
ec527c318036a65 Jiri Kosina       2019-05-30  330  	 * Those will be put to proper (not interfering with hibernation
ec527c318036a65 Jiri Kosina       2019-05-30  331  	 * resume) sleep afterwards, and the resumed kernel will decide itself
ec527c318036a65 Jiri Kosina       2019-05-30  332  	 * what to do with them.
406f992e4a372da Rafael J. Wysocki 2016-07-14  333  	 */
ec527c318036a65 Jiri Kosina       2019-05-30  334  	ret = cpuhp_smt_enable();
ec527c318036a65 Jiri Kosina       2019-05-30  335  	if (ret)
ec527c318036a65 Jiri Kosina       2019-05-30  336  		return ret;
406f992e4a372da Rafael J. Wysocki 2016-07-14  337  	smp_ops.play_dead = resume_play_dead;
565558558985b1d Qais Yousef       2020-04-30 @338  	ret = freeze_secondary_cpus(0);
406f992e4a372da Rafael J. Wysocki 2016-07-14  339  	smp_ops.play_dead = play_dead;
406f992e4a372da Rafael J. Wysocki 2016-07-14  340  	return ret;
406f992e4a372da Rafael J. Wysocki 2016-07-14  341  }
406f992e4a372da Rafael J. Wysocki 2016-07-14  342  #endif
406f992e4a372da Rafael J. Wysocki 2016-07-14  343  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2026-09-11  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-09 17:05 [PATCH] PM: sleep: only allow relevant powerpc platforms to enable PM_SLEEP_SMP Julian Braha
2026-09-11  8:44 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®