From: kernel test robot <lkp@intel.com>
To: "Kiryl Shutsemau (Meta)" <kas@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [kas:collapse/rfc-v1 26/76] include/linux/swapops.h:260:19: error: use of undeclared identifier 'SWP_HWPOISON'; did you mean 'FOLL_HWPOISON'?
Date: Tue, 18 Aug 2026 23:49:31 +0800 [thread overview]
Message-ID: <202608182349.Ot06AoJF-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git collapse/rfc-v1
head: efac4ce42bf9ea34a32d1563fe3370ee837a751f
commit: 056b294111d8d94a963c8e885186a1a723a59808 [26/76] mm/collapse: sketch the new anonymous collapse engine
config: i386-buildonly-randconfig-002-20260818 (https://download.01.org/0day-ci/archive/20260818/202608182349.Ot06AoJF-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260818/202608182349.Ot06AoJF-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/202608182349.Ot06AoJF-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from mm/collapse.c:8:
In file included from include/linux/leafops.h:11:
include/linux/swapops.h:88:21: error: use of undeclared identifier 'MAX_SWAPFILES_SHIFT'
88 | ret.val = (type << SWP_TYPE_SHIFT) | (offset & SWP_OFFSET_MASK);
| ^~~~~~~~~~~~~~
include/linux/swapops.h:27:45: note: expanded from macro 'SWP_TYPE_SHIFT'
27 | #define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
include/linux/swapops.h:88:49: error: use of undeclared identifier 'MAX_SWAPFILES_SHIFT'
88 | ret.val = (type << SWP_TYPE_SHIFT) | (offset & SWP_OFFSET_MASK);
| ^~~~~~~~~~~~~~~
include/linux/swapops.h:28:34: note: expanded from macro 'SWP_OFFSET_MASK'
28 | #define SWP_OFFSET_MASK ((1UL << SWP_TYPE_SHIFT) - 1)
| ^~~~~~~~~~~~~~
include/linux/swapops.h:27:45: note: expanded from macro 'SWP_TYPE_SHIFT'
27 | #define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
include/linux/swapops.h:98:23: error: use of undeclared identifier 'MAX_SWAPFILES_SHIFT'
98 | return (entry.val >> SWP_TYPE_SHIFT);
| ^~~~~~~~~~~~~~
include/linux/swapops.h:27:45: note: expanded from macro 'SWP_TYPE_SHIFT'
27 | #define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
include/linux/swapops.h:107:21: error: use of undeclared identifier 'MAX_SWAPFILES_SHIFT'
107 | return entry.val & SWP_OFFSET_MASK;
| ^~~~~~~~~~~~~~~
include/linux/swapops.h:28:34: note: expanded from macro 'SWP_OFFSET_MASK'
28 | #define SWP_OFFSET_MASK ((1UL << SWP_TYPE_SHIFT) - 1)
| ^~~~~~~~~~~~~~
include/linux/swapops.h:27:45: note: expanded from macro 'SWP_TYPE_SHIFT'
27 | #define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
include/linux/swapops.h:173:19: error: use of undeclared identifier 'SWP_MIGRATION_READ'; did you mean 'THP_MIGRATION_FAIL'?
173 | return swp_entry(SWP_MIGRATION_READ, offset);
| ^~~~~~~~~~~~~~~~~~
| THP_MIGRATION_FAIL
include/linux/vm_event_item.h:62:3: note: 'THP_MIGRATION_FAIL' declared here
62 | THP_MIGRATION_FAIL,
| ^
In file included from mm/collapse.c:8:
In file included from include/linux/leafops.h:11:
include/linux/swapops.h:178:19: error: use of undeclared identifier 'SWP_MIGRATION_READ_EXCLUSIVE'
178 | return swp_entry(SWP_MIGRATION_READ_EXCLUSIVE, offset);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/swapops.h:183:19: error: use of undeclared identifier 'SWP_MIGRATION_WRITE'
183 | return swp_entry(SWP_MIGRATION_WRITE, offset);
| ^~~~~~~~~~~~~~~~~~~
include/linux/swapops.h:204:26: error: use of undeclared identifier 'MAX_SWAPFILES_SHIFT'
204 | swp_offset(entry) | SWP_MIG_YOUNG);
| ^~~~~~~~~~~~~
include/linux/swapops.h:66:29: note: expanded from macro 'SWP_MIG_YOUNG'
66 | #define SWP_MIG_YOUNG BIT(SWP_MIG_YOUNG_BIT)
| ^~~~~~~~~~~~~~~~~
include/linux/swapops.h:62:29: note: expanded from macro 'SWP_MIG_YOUNG_BIT'
62 | #define SWP_MIG_YOUNG_BIT (SWP_PFN_BITS)
| ^~~~~~~~~~~~
include/linux/swapops.h:40:11: note: expanded from macro 'SWP_PFN_BITS'
40 | SWP_TYPE_SHIFT)
| ^~~~~~~~~~~~~~
include/linux/swapops.h:27:45: note: expanded from macro 'SWP_TYPE_SHIFT'
27 | #define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
include/linux/swapops.h:212:26: error: use of undeclared identifier 'MAX_SWAPFILES_SHIFT'
212 | swp_offset(entry) | SWP_MIG_DIRTY);
| ^~~~~~~~~~~~~
include/linux/swapops.h:67:29: note: expanded from macro 'SWP_MIG_DIRTY'
67 | #define SWP_MIG_DIRTY BIT(SWP_MIG_DIRTY_BIT)
| ^~~~~~~~~~~~~~~~~
include/linux/swapops.h:63:29: note: expanded from macro 'SWP_MIG_DIRTY_BIT'
63 | #define SWP_MIG_DIRTY_BIT (SWP_PFN_BITS + 1)
| ^~~~~~~~~~~~
include/linux/swapops.h:40:11: note: expanded from macro 'SWP_PFN_BITS'
40 | SWP_TYPE_SHIFT)
| ^~~~~~~~~~~~~~
include/linux/swapops.h:27:45: note: expanded from macro 'SWP_TYPE_SHIFT'
27 | #define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT)
| ^~~~~~~~~~~~~~~~~~~
>> include/linux/swapops.h:260:19: error: use of undeclared identifier 'SWP_HWPOISON'; did you mean 'FOLL_HWPOISON'?
260 | return swp_entry(SWP_HWPOISON, page_to_pfn(page));
| ^~~~~~~~~~~~
| FOLL_HWPOISON
include/linux/mm_types.h:1904:2: note: 'FOLL_HWPOISON' declared here
1904 | FOLL_HWPOISON = 1 << 6,
| ^
In file included from mm/collapse.c:8:
In file included from include/linux/leafops.h:11:
include/linux/swapops.h:265:28: error: use of undeclared identifier 'SWP_HWPOISON'; did you mean 'FOLL_HWPOISON'?
265 | return swp_type(entry) == SWP_HWPOISON;
| ^~~~~~~~~~~~
| FOLL_HWPOISON
include/linux/mm_types.h:1904:2: note: 'FOLL_HWPOISON' declared here
1904 | FOLL_HWPOISON = 1 << 6,
| ^
In file included from mm/collapse.c:8:
In file included from include/linux/leafops.h:11:
include/linux/swapops.h:304:19: error: use of undeclared identifier 'SWP_PTE_MARKER'
304 | return swp_entry(SWP_PTE_MARKER, marker);
| ^~~~~~~~~~~~~~
12 errors generated.
vim +260 include/linux/swapops.h
07a57a338adb6e Oscar Salvador 2024-04-07 253
07a57a338adb6e Oscar Salvador 2024-04-07 254 /*
07a57a338adb6e Oscar Salvador 2024-04-07 255 * Support for hardware poisoned pages
07a57a338adb6e Oscar Salvador 2024-04-07 256 */
07a57a338adb6e Oscar Salvador 2024-04-07 257 static inline swp_entry_t make_hwpoison_entry(struct page *page)
07a57a338adb6e Oscar Salvador 2024-04-07 258 {
07a57a338adb6e Oscar Salvador 2024-04-07 259 BUG_ON(!PageLocked(page));
07a57a338adb6e Oscar Salvador 2024-04-07 @260 return swp_entry(SWP_HWPOISON, page_to_pfn(page));
07a57a338adb6e Oscar Salvador 2024-04-07 261 }
07a57a338adb6e Oscar Salvador 2024-04-07 262
:::::: The code at line 260 was first introduced by commit
:::::: 07a57a338adb6ec9e766d6a6790f76527f45ceb5 mm,swapops: update check in is_pfn_swap_entry for hwpoison entries
:::::: TO: Oscar Salvador <osalvador@suse.de>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-18 15:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202608182349.Ot06AoJF-lkp@intel.com \
--to=lkp@intel.com \
--cc=kas@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.