* Re: [PATCH 1/3] PM: hibernate: Fix hybrid-sleep
[not found] <20250924205211.1059571-2-superm1@kernel.org>
@ 2025-09-25 15:30 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-09-25 15:30 UTC (permalink / raw)
To: Mario Limonciello (AMD), Alex Deucher, Rafael J . Wysocki
Cc: llvm, oe-kbuild-all, Samuel Zhang, amd-gfx,
(open list:HIBERNATION (aka Software Suspend, aka swsusp)),
aka swsusp)), Mario Limonciello, Ionut Nechita
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-25 15:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250924205211.1059571-2-superm1@kernel.org>
2025-09-25 15:30 ` [PATCH 1/3] PM: hibernate: Fix hybrid-sleep 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