[willy-pagecache:headers 1/7] arch/xtensa/kernel/hibernate.c:9:57: error: '__nosave_begin' undeclared; did you mean 'nosave_begin_pfn'?

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   git://git.infradead.org/users/willy/pagecache headers
head:   5a75fff46226e59e4c4d87c36f7de79ec4cabdb4
commit: fe4eb6e120822a6de3c06fbe07bc359b78dd3bda [1/7] headers: Remove swap.h from suspend.h
config: xtensa-randconfig-001-20260813 (https://download.01.org/0day-ci/archive/20260813/[email protected]/config)
compiler: xtensa-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/memory_model.h:5,
                    from arch/xtensa/include/asm/page.h:176,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/mmzone.h:22,
                    from include/linux/gfp.h:7,
                    from include/linux/mm.h:8,
                    from arch/xtensa/kernel/hibernate.c:3:
   arch/xtensa/kernel/hibernate.c: In function 'pfn_is_nosave':
>> arch/xtensa/kernel/hibernate.c:9:57: error: '__nosave_begin' undeclared (first use in this function); did you mean 'nosave_begin_pfn'?
       9 |         unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin));
         |                                                         ^~~~~~~~~~~~~~
   include/linux/pfn.h:11:27: note: in definition of macro 'PFN_DOWN'
      11 | #define PFN_DOWN(x)     ((x) >> PAGE_SHIFT)
         |                           ^
   arch/xtensa/kernel/hibernate.c:9:51: note: in expansion of macro '__pa'
       9 |         unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin));
         |                                                   ^~~~
   arch/xtensa/kernel/hibernate.c:9:57: note: each undeclared identifier is reported only once for each function it appears in
       9 |         unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin));
         |                                                         ^~~~~~~~~~~~~~
   include/linux/pfn.h:11:27: note: in definition of macro 'PFN_DOWN'
      11 | #define PFN_DOWN(x)     ((x) >> PAGE_SHIFT)
         |                           ^
   arch/xtensa/kernel/hibernate.c:9:51: note: in expansion of macro '__pa'
       9 |         unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin));
         |                                                   ^~~~
>> arch/xtensa/kernel/hibernate.c:10:53: error: '__nosave_end' undeclared (first use in this function)
      10 |         unsigned long nosave_end_pfn = PFN_UP(__pa(&__nosave_end));
         |                                                     ^~~~~~~~~~~~
   arch/xtensa/kernel/hibernate.c:10:40: note: in expansion of macro 'PFN_UP'
      10 |         unsigned long nosave_end_pfn = PFN_UP(__pa(&__nosave_end));
         |                                        ^~~~~~
   arch/xtensa/kernel/hibernate.c:10:47: note: in expansion of macro '__pa'
      10 |         unsigned long nosave_end_pfn = PFN_UP(__pa(&__nosave_end));
         |                                               ^~~~


vim +9 arch/xtensa/kernel/hibernate.c

733f5c28e59ef2 Max Filippov 2022-04-20   6  
733f5c28e59ef2 Max Filippov 2022-04-20   7  int pfn_is_nosave(unsigned long pfn)
733f5c28e59ef2 Max Filippov 2022-04-20   8  {
733f5c28e59ef2 Max Filippov 2022-04-20  @9  	unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin));
733f5c28e59ef2 Max Filippov 2022-04-20 @10  	unsigned long nosave_end_pfn = PFN_UP(__pa(&__nosave_end));
733f5c28e59ef2 Max Filippov 2022-04-20  11  
733f5c28e59ef2 Max Filippov 2022-04-20  12  	return	(pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn);
733f5c28e59ef2 Max Filippov 2022-04-20  13  }
733f5c28e59ef2 Max Filippov 2022-04-20  14  

:::::: The code at line 9 was first introduced by commit
:::::: 733f5c28e59ef23fef9e0b64d79df24c2a4eed2b xtensa: add hibernation support

:::::: TO: Max Filippov <[email protected]>
:::::: CC: Max Filippov <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.