public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM: ACPI: reboot: Reinstate S5 for reboot
@ 2022-09-05  7:15 Kai-Heng Feng
  2022-09-05 16:31 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Kai-Heng Feng @ 2022-09-05  7:15 UTC (permalink / raw)
  To: rafael.j.wysocki
  Cc: Kai-Heng Feng, Josef Bacik, Dmitry Osipenko, Petr Mladek,
	Luis Chamberlain, tangmeng, YueHaibing, linux-kernel

Commit d60cd06331a3 ("PM: ACPI: reboot: Use S5 for reboot") caused Dell
PowerEdge r440 hangs at boot.

The issue is fixed by commit 2ca1c94ce0b6 ("tg3: Disable tg3 device on
system reboot to avoid triggering AER"), so reinstate the patch again.

Cc: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 kernel/reboot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/reboot.c b/kernel/reboot.c
index 3c35445bf5ad3..c0b89007f0d1b 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -254,6 +254,8 @@ void migrate_to_reboot_cpu(void)
 void kernel_restart(char *cmd)
 {
 	kernel_restart_prepare(cmd);
+	if (pm_power_off_prepare)
+		pm_power_off_prepare();
 	migrate_to_reboot_cpu();
 	syscore_shutdown();
 	if (!cmd)
-- 
2.36.1


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

* Re: [PATCH] PM: ACPI: reboot: Reinstate S5 for reboot
  2022-09-05  7:15 [PATCH] PM: ACPI: reboot: Reinstate S5 for reboot Kai-Heng Feng
@ 2022-09-05 16:31 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-09-05 16:31 UTC (permalink / raw)
  To: Kai-Heng Feng, rafael.j.wysocki
  Cc: llvm, kbuild-all, Kai-Heng Feng, Josef Bacik, Dmitry Osipenko,
	Petr Mladek, Luis Chamberlain, tangmeng, YueHaibing, linux-kernel

Hi Kai-Heng,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rafael-pm/linux-next]
[also build test ERROR on linus/master v6.0-rc4 next-20220901]
[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/Kai-Heng-Feng/PM-ACPI-reboot-Reinstate-S5-for-reboot/20220905-152323
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: mips-randconfig-r034-20220905 (https://download.01.org/0day-ci/archive/20220906/202209060009.J18tERPi-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/b2191fe14b5426dcef80f2935fdfa47af98b0ee2
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Kai-Heng-Feng/PM-ACPI-reboot-Reinstate-S5-for-reboot/20220905-152323
        git checkout b2191fe14b5426dcef80f2935fdfa47af98b0ee2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> kernel/reboot.c:257:6: error: use of undeclared identifier 'pm_power_off_prepare'; did you mean 'pm_generic_prepare'?
           if (pm_power_off_prepare)
               ^~~~~~~~~~~~~~~~~~~~
               pm_generic_prepare
   include/linux/pm.h:795:12: note: 'pm_generic_prepare' declared here
   extern int pm_generic_prepare(struct device *dev);
              ^
>> kernel/reboot.c:258:3: error: call to undeclared function 'pm_power_off_prepare'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   pm_power_off_prepare();
                   ^
   2 errors generated.


vim +257 kernel/reboot.c

   245	
   246	/**
   247	 *	kernel_restart - reboot the system
   248	 *	@cmd: pointer to buffer containing command to execute for restart
   249	 *		or %NULL
   250	 *
   251	 *	Shutdown everything and perform a clean reboot.
   252	 *	This is not safe to call in interrupt context.
   253	 */
   254	void kernel_restart(char *cmd)
   255	{
   256		kernel_restart_prepare(cmd);
 > 257		if (pm_power_off_prepare)
 > 258			pm_power_off_prepare();
   259		migrate_to_reboot_cpu();
   260		syscore_shutdown();
   261		if (!cmd)
   262			pr_emerg("Restarting system\n");
   263		else
   264			pr_emerg("Restarting system with command '%s'\n", cmd);
   265		kmsg_dump(KMSG_DUMP_SHUTDOWN);
   266		machine_restart(cmd);
   267	}
   268	EXPORT_SYMBOL_GPL(kernel_restart);
   269	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

end of thread, other threads:[~2022-09-05 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-05  7:15 [PATCH] PM: ACPI: reboot: Reinstate S5 for reboot Kai-Heng Feng
2022-09-05 16:31 ` 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