Re: [PATCH v3 11/11] selftests/mm: add PMD swap entry tests

From: kernel test robot

Date: Sat Jul 04 2026 - 04:30:44 EST


Hi Usama,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url: https://github.com/intel-lab-lkp/linux/commits/Usama-Arif/mm-add-PMD-swap-entry-detection-support/20260704-014151
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20260703173903.3789516-12-usama.arif%40linux.dev
patch subject: [PATCH v3 11/11] selftests/mm: add PMD swap entry tests
config: i386-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260704/202607041039.WHXO0OYv-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260704/202607041039.WHXO0OYv-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607041039.WHXO0OYv-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from ./include/linux/mm.h:31,
from ./include/linux/memcontrol.h:21,
from ./include/linux/swap.h:9,
from ./include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:14:
>> ./include/linux/pgtable.h:1921:21: error: redefinition of 'pmd_swp_mkexclusive'
1921 | static inline pmd_t pmd_swp_mkexclusive(pmd_t pmd)
| ^~~~~~~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/tlbflush.h:17,
from ./arch/x86/include/asm/uaccess.h:17,
from ./include/linux/uaccess.h:13,
from ./include/linux/sched/task.h:13,
from ./include/linux/sched/signal.h:9,
from ./include/linux/rcuwait.h:6,
from ./include/linux/percpu-rwsem.h:7,
from ./include/linux/fs/super_types.h:13,
from ./include/linux/fs/super.h:5,
from ./include/linux/fs.h:5,
from ./include/linux/cgroup.h:17,
from ./include/linux/memcontrol.h:13:
./arch/x86/include/asm/pgtable.h:1532:21: note: previous definition of 'pmd_swp_mkexclusive' with type 'pmd_t(pmd_t)'
1532 | static inline pmd_t pmd_swp_mkexclusive(pmd_t pmd)
| ^~~~~~~~~~~~~~~~~~~
>> ./include/linux/pgtable.h:1926:20: error: conflicting types for 'pmd_swp_exclusive'; have 'bool(pmd_t)' {aka '_Bool(pmd_t)'}
1926 | static inline bool pmd_swp_exclusive(pmd_t pmd)
| ^~~~~~~~~~~~~~~~~
./arch/x86/include/asm/pgtable.h:1537:19: note: previous definition of 'pmd_swp_exclusive' with type 'int(pmd_t)'
1537 | static inline int pmd_swp_exclusive(pmd_t pmd)
| ^~~~~~~~~~~~~~~~~
>> ./include/linux/pgtable.h:1931:21: error: redefinition of 'pmd_swp_clear_exclusive'
1931 | static inline pmd_t pmd_swp_clear_exclusive(pmd_t pmd)
| ^~~~~~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/pgtable.h:1542:21: note: previous definition of 'pmd_swp_clear_exclusive' with type 'pmd_t(pmd_t)'
1542 | static inline pmd_t pmd_swp_clear_exclusive(pmd_t pmd)
| ^~~~~~~~~~~~~~~~~~~~~~~


vim +/pmd_swp_mkexclusive +1921 ./include/linux/pgtable.h

1919
1920 #ifndef CONFIG_ARCH_SUPPORTS_PMD_SOFTLEAF
> 1921 static inline pmd_t pmd_swp_mkexclusive(pmd_t pmd)
1922 {
1923 return pmd;
1924 }
1925
> 1926 static inline bool pmd_swp_exclusive(pmd_t pmd)
1927 {
1928 return false;
1929 }
1930
> 1931 static inline pmd_t pmd_swp_clear_exclusive(pmd_t pmd)
1932 {
1933 return pmd;
1934 }
1935 #endif
1936

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