public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Mario Limonciello (AMD)" <superm1@kernel.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Samuel Zhang <guoqing.zhang@amd.com>,
	amd-gfx@lists.freedesktop.org,
	"(open list:HIBERNATION (aka Software Suspend,
	aka swsusp))" <linux-pm@vger.kernel.org>, "aka swsusp)),
	Mario Limonciello" <superm1@kernel.org>,
	Ionut Nechita <ionut_n2001@yahoo.com>
Subject: Re: [PATCH 1/3] PM: hibernate: Fix hybrid-sleep
Date: Thu, 25 Sep 2025 23:30:31 +0800	[thread overview]
Message-ID: <202509252323.KEdz98a4-lkp@intel.com> (raw)
In-Reply-To: <20250924205211.1059571-2-superm1@kernel.org>

Hi Mario,

kernel test robot noticed the following build errors:

[auto build test ERROR on amd-pstate/linux-next]
[also build test ERROR on amd-pstate/bleeding-edge linus/master v6.17-rc7 next-20250924]
[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/Mario-Limonciello-AMD/PM-hibernate-Fix-hybrid-sleep/20250925-045432
base:   https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git linux-next
patch link:    https://lore.kernel.org/r/20250924205211.1059571-2-superm1%40kernel.org
patch subject: [PATCH 1/3] PM: hibernate: Fix hybrid-sleep
config: i386-randconfig-014-20250925 (https://download.01.org/0day-ci/archive/20250925/202509252323.KEdz98a4-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250925/202509252323.KEdz98a4-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/202509252323.KEdz98a4-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/power/hibernate.c:866:27: error: use of undeclared identifier 'HIBERNATION_SUSPEND'
     866 |                 if (hibernation_mode != HIBERNATION_SUSPEND)
         |                                         ^
   1 error generated.


vim +/HIBERNATION_SUSPEND +866 kernel/power/hibernate.c

   776	
   777	/**
   778	 * hibernate - Carry out system hibernation, including saving the image.
   779	 */
   780	int hibernate(void)
   781	{
   782		bool snapshot_test = false;
   783		unsigned int sleep_flags;
   784		int error;
   785	
   786		if (!hibernation_available()) {
   787			pm_pr_dbg("Hibernation not available.\n");
   788			return -EPERM;
   789		}
   790	
   791		/*
   792		 * Query for the compression algorithm support if compression is enabled.
   793		 */
   794		if (!nocompress) {
   795			strscpy(hib_comp_algo, hibernate_compressor);
   796			if (!crypto_has_acomp(hib_comp_algo, 0, CRYPTO_ALG_ASYNC)) {
   797				pr_err("%s compression is not available\n", hib_comp_algo);
   798				return -EOPNOTSUPP;
   799			}
   800		}
   801	
   802		sleep_flags = lock_system_sleep();
   803		/* The snapshot device should not be opened while we're running */
   804		if (!hibernate_acquire()) {
   805			error = -EBUSY;
   806			goto Unlock;
   807		}
   808	
   809		pr_info("hibernation entry\n");
   810		pm_prepare_console();
   811		error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION);
   812		if (error)
   813			goto Restore;
   814	
   815		ksys_sync_helper();
   816		if (filesystem_freeze_enabled)
   817			filesystems_freeze();
   818	
   819		error = freeze_processes();
   820		if (error)
   821			goto Exit;
   822	
   823		lock_device_hotplug();
   824		/* Allocate memory management structures */
   825		error = create_basic_memory_bitmaps();
   826		if (error)
   827			goto Thaw;
   828	
   829		error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
   830		if (error || freezer_test_done)
   831			goto Free_bitmaps;
   832	
   833		if (in_suspend) {
   834			unsigned int flags = 0;
   835	
   836			if (hibernation_mode == HIBERNATION_PLATFORM)
   837				flags |= SF_PLATFORM_MODE;
   838			if (nocompress) {
   839				flags |= SF_NOCOMPRESS_MODE;
   840			} else {
   841			        flags |= SF_CRC32_MODE;
   842	
   843				/*
   844				 * By default, LZO compression is enabled. Use SF_COMPRESSION_ALG_LZ4
   845				 * to override this behaviour and use LZ4.
   846				 *
   847				 * Refer kernel/power/power.h for more details
   848				 */
   849	
   850				if (!strcmp(hib_comp_algo, COMPRESSION_ALGO_LZ4))
   851					flags |= SF_COMPRESSION_ALG_LZ4;
   852				else
   853					flags |= SF_COMPRESSION_ALG_LZO;
   854			}
   855	
   856			pm_pr_dbg("Writing hibernation image.\n");
   857			error = swsusp_write(flags);
   858			swsusp_free();
   859			if (!error) {
   860				if (hibernation_mode == HIBERNATION_TEST_RESUME)
   861					snapshot_test = true;
   862				else
   863					power_down();
   864			}
   865			in_suspend = 0;
 > 866			if (hibernation_mode != HIBERNATION_SUSPEND)
   867				pm_restore_gfp_mask();
   868		} else {
   869			pm_pr_dbg("Hibernation image restored successfully.\n");
   870		}
   871	
   872	 Free_bitmaps:
   873		free_basic_memory_bitmaps();
   874	 Thaw:
   875		unlock_device_hotplug();
   876		if (snapshot_test) {
   877			pm_pr_dbg("Checking hibernation image\n");
   878			error = swsusp_check(false);
   879			if (!error)
   880				error = load_image_and_restore();
   881		}
   882		thaw_processes();
   883	
   884		/* Don't bother checking whether freezer_test_done is true */
   885		freezer_test_done = false;
   886	 Exit:
   887		filesystems_thaw();
   888		pm_notifier_call_chain(PM_POST_HIBERNATION);
   889	 Restore:
   890		pm_restore_console();
   891		hibernate_release();
   892	 Unlock:
   893		unlock_system_sleep(sleep_flags);
   894		pr_info("hibernation exit\n");
   895	
   896		return error;
   897	}
   898	

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

  reply	other threads:[~2025-09-25 15:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 20:52 [PATCH 0/3] Fixes for hybrid sleep Mario Limonciello (AMD)
2025-09-24 20:52 ` [PATCH 1/3] PM: hibernate: Fix hybrid-sleep Mario Limonciello (AMD)
2025-09-25 15:30   ` kernel test robot [this message]
2025-09-24 20:52 ` [PATCH 2/3] PM: hibernate: Add pm_hibernation_mode_is_suspend() Mario Limonciello (AMD)
2025-09-25 15:30   ` kernel test robot
2025-09-24 20:52 ` [PATCH 3/3] drm/amd: Fix hybrid sleep Mario Limonciello (AMD)
2025-09-24 21:05   ` Deucher, Alexander
2025-09-25 13:56 ` [PATCH 0/3] Fixes for " Kenneth Crudup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509252323.KEdz98a4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=guoqing.zhang@amd.com \
    --cc=ionut_n2001@yahoo.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=superm1@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox