All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android17-6.18 1/1] mm/hmm.c:247:6: error: call to undeclared function 'pte_none_mostly'; ISO C99 and later do not support implicit function declarations
@ 2026-09-29  5:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-29  5:53 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

Hi Vamsidhar,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android17-6.18
head:   4f02a973d94c2e1b76391568aaf9d316067b9322
commit: ad36ecd6081db9827f1ebaa41671b0b336fd83bf [1/1] ANDROID: GKI: Enable HMM_MIRROR config for all arch
config: arm-randconfig-1001-20260929 (https://download.01.org/0day-ci/archive/20260929/202609291352.m2dqMolh-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5f609f950d2e80addf5566623013db68394334db)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260929/202609291352.m2dqMolh-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/202609291352.m2dqMolh-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/hmm.c:230:6: error: call to undeclared function 'pte_none'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     230 |         if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
         |             ^
   mm/hmm.c:230:24: error: call to undeclared function 'pte_present'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     230 |         if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
         |                               ^
   mm/hmm.c:230:44: error: call to undeclared function 'pte_protnone'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     230 |         if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
         |                                                   ^
   mm/hmm.c:232:9: error: call to undeclared function 'pte_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     232 |         return pte_write(pte) ? (HMM_PFN_VALID | HMM_PFN_WRITE) : HMM_PFN_VALID;
         |                ^
   mm/hmm.c:232:9: note: did you mean 'pgd_write'?
   include/linux/hugetlb.h:472:19: note: 'pgd_write' declared here
     472 | static inline int pgd_write(pgd_t pgd)
         |                   ^
   mm/hmm.c:243:14: error: call to undeclared function 'ptep_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     243 |         pte_t pte = ptep_get(ptep);
         |                     ^
>> mm/hmm.c:247:6: error: call to undeclared function 'pte_none_mostly'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     247 |         if (pte_none_mostly(pte)) {
         |             ^
   mm/hmm.c:255:7: error: call to undeclared function 'pte_present'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     255 |         if (!pte_present(pte)) {
         |              ^
   mm/hmm.c:256:23: error: call to undeclared function 'pte_to_swp_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     256 |                 swp_entry_t entry = pte_to_swp_entry(pte);
         |                                     ^
   mm/hmm.c:256:15: error: initializing 'swp_entry_t' with an expression of incompatible type 'int'
     256 |                 swp_entry_t entry = pte_to_swp_entry(pte);
         |                             ^       ~~~~~~~~~~~~~~~~~~~~~
>> mm/hmm.c:262:7: error: call to undeclared function 'is_device_private_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     262 |                 if (is_device_private_entry(entry) &&
         |                     ^
   mm/hmm.c:262:7: note: did you mean 'is_device_private_page'?
   include/linux/memremap.h:167:20: note: 'is_device_private_page' declared here
     167 | static inline bool is_device_private_page(const struct page *page)
         |                    ^
   mm/hmm.c:263:18: error: call to undeclared function 'pfn_swap_entry_to_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     263 |                     page_pgmap(pfn_swap_entry_to_page(entry))->owner ==
         |                                ^
   mm/hmm.c:263:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct page *' [-Wint-conversion]
     263 |                     page_pgmap(pfn_swap_entry_to_page(entry))->owner ==
         |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mmzone.h:1245:65: note: passing argument to parameter 'page' here
    1245 | static inline struct dev_pagemap *page_pgmap(const struct page *page)
         |                                                                 ^
   mm/hmm.c:266:8: error: call to undeclared function 'is_writable_device_private_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     266 |                         if (is_writable_device_private_entry(entry))
         |                             ^
   mm/hmm.c:268:20: error: call to undeclared function 'swp_offset_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     268 |                         new_pfn_flags = swp_offset_pfn(entry) | cpu_flags;
         |                                         ^
   mm/hmm.c:277:8: error: call to undeclared function 'non_swap_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     277 |                 if (!non_swap_entry(entry))
         |                      ^
   mm/hmm.c:277:8: note: did you mean 'page_swap_entry'?
   include/linux/swap.h:316:27: note: 'page_swap_entry' declared here
     316 | static inline swp_entry_t page_swap_entry(struct page *page)
         |                           ^
   mm/hmm.c:283:7: error: call to undeclared function 'is_device_exclusive_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     283 |                 if (is_device_exclusive_entry(entry))
         |                     ^
   mm/hmm.c:286:7: error: call to undeclared function 'is_migration_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     286 |                 if (is_migration_entry(entry)) {
         |                     ^
   mm/hmm.c:287:4: error: call to undeclared function 'pte_unmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     287 |                         pte_unmap(ptep);
         |                         ^
   mm/hmm.c:287:4: note: did you mean 'memunmap'?
   include/linux/io.h:159:6: note: 'memunmap' declared here
     159 | void memunmap(void *addr);
         |      ^
   mm/hmm.c:289:4: error: call to undeclared function 'migration_entry_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     289 |                         migration_entry_wait(walk->mm, pmdp, addr);
         |                         ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   20 errors generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for USB_PHY
   Depends on [n]: USB_SUPPORT [=n]
   Selected by [y]:
   - GKI_HIDDEN_USB_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for SND_JACK
   Depends on [n]: SOUND [=n] && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for SND_VMASTER
   Depends on [n]: SOUND [=n] && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for CAN_RX_OFFLOAD
   Depends on [n]: NETDEVICES [=y] && CAN_DEV [=y] && CAN_NETLINK [=n]
   Selected by [y]:
   - GKI_HIDDEN_MCP251XFD_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for SND_JACK_INPUT_DEV
   Depends on [n]: SOUND [=n] && SND [=n] && SND_JACK [=y]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for WEXT_PROC
   Depends on [n]: NET [=y] && WIRELESS [=n] && PROC_FS [=y] && WEXT_CORE [=y]
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for SND_PCM_ELD
   Depends on [n]: SOUND [=n] && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for WEXT_PRIV
   Depends on [n]: NET [=y] && WIRELESS [=n]
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for HMM_MIRROR
   Depends on [n]: MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_DRM_CONFIGS [=y] && DRM [=y]
   WARNING: unmet direct dependencies detected for DRM_GEM_SHMEM_HELPER
   Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_DRM_CONFIGS [=y] && DRM [=y]
   WARNING: unmet direct dependencies detected for BALLOON_COMPACTION
   Depends on [n]: COMPACTION [=n] && MEMORY_BALLOON [=y]
   Selected by [y]:
   - GKI_HIDDEN_MM_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for DRM_TTM
   Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_DRM_CONFIGS [=y] && HAS_IOMEM [=y] && DRM [=y]
   WARNING: unmet direct dependencies detected for SND_PCM_IEC958
   Depends on [n]: SOUND [=n] && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_SOC_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for IOMMU_SVA
   Depends on [n]: IOMMU_SUPPORT [=n]
   Selected by [y]:
   - GKI_HIDDEN_IOMMU_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for WIRELESS_EXT
   Depends on [n]: NET [=y] && WIRELESS [=n]
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for WEXT_CORE
   Depends on [n]: NET [=y] && WIRELESS [=n] && (CFG80211_WEXT [=n] || WIRELESS_EXT [=y])
   Selected by [y]:
   - GKI_LEGACY_WEXT_ALLCONFIG [=y]
   WARNING: unmet direct dependencies detected for SND_COMPRESS_ACCEL
   Depends on [n]: SOUND [=n] && SND [=n]
   Selected by [y]:
   - GKI_HIDDEN_SND_CONFIGS [=y]


vim +/pte_none_mostly +247 mm/hmm.c

2aee09d8c11642 Jérôme Glisse   2018-04-10  234  
53f5c3f489ecdd Jérôme Glisse   2018-04-10  235  static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr,
53f5c3f489ecdd Jérôme Glisse   2018-04-10  236  			      unsigned long end, pmd_t *pmdp, pte_t *ptep,
2733ea144dcce7 Jason Gunthorpe 2020-05-01  237  			      unsigned long *hmm_pfn)
53f5c3f489ecdd Jérôme Glisse   2018-04-10  238  {
53f5c3f489ecdd Jérôme Glisse   2018-04-10  239  	struct hmm_vma_walk *hmm_vma_walk = walk->private;
f88a1e90c66540 Jérôme Glisse   2018-04-10  240  	struct hmm_range *range = hmm_vma_walk->range;
a3eb13c1579ba9 Jason Gunthorpe 2020-03-27  241  	unsigned int required_fault;
2733ea144dcce7 Jason Gunthorpe 2020-05-01  242  	unsigned long cpu_flags;
c33c794828f212 Ryan Roberts    2023-06-12  243  	pte_t pte = ptep_get(ptep);
2733ea144dcce7 Jason Gunthorpe 2020-05-01  244  	uint64_t pfn_req_flags = *hmm_pfn;
285e871884ff3d Leon Romanovsky 2025-04-28  245  	uint64_t new_pfn_flags = 0;
da4c3c735ea4dc Jérôme Glisse   2017-09-08  246  
5c041f5d1f23d3 Peter Xu        2022-05-12 @247  	if (pte_none_mostly(pte)) {
2733ea144dcce7 Jason Gunthorpe 2020-05-01  248  		required_fault =
2733ea144dcce7 Jason Gunthorpe 2020-05-01  249  			hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, 0);
a3eb13c1579ba9 Jason Gunthorpe 2020-03-27  250  		if (required_fault)
74eee180b935fc Jérôme Glisse   2017-09-08  251  			goto fault;
285e871884ff3d Leon Romanovsky 2025-04-28  252  		goto out;
74eee180b935fc Jérôme Glisse   2017-09-08  253  	}
74eee180b935fc Jérôme Glisse   2017-09-08  254  
74eee180b935fc Jérôme Glisse   2017-09-08  255  	if (!pte_present(pte)) {
8d63e4cd62b258 Ralph Campbell  2018-01-31  256  		swp_entry_t entry = pte_to_swp_entry(pte);
74eee180b935fc Jérôme Glisse   2017-09-08  257  
74eee180b935fc Jérôme Glisse   2017-09-08  258  		/*
8a295dbbaf7292 Ralph Campbell  2022-07-25  259  		 * Don't fault in device private pages owned by the caller,
8a295dbbaf7292 Ralph Campbell  2022-07-25  260  		 * just report the PFN.
74eee180b935fc Jérôme Glisse   2017-09-08  261  		 */
8a295dbbaf7292 Ralph Campbell  2022-07-25 @262  		if (is_device_private_entry(entry) &&
82ba975e4c43d9 Alistair Popple 2025-02-28  263  		    page_pgmap(pfn_swap_entry_to_page(entry))->owner ==
8a295dbbaf7292 Ralph Campbell  2022-07-25  264  		    range->dev_private_owner) {
2733ea144dcce7 Jason Gunthorpe 2020-05-01  265  			cpu_flags = HMM_PFN_VALID;
4dd845b5a3e57a Alistair Popple 2021-06-30  266  			if (is_writable_device_private_entry(entry))
2733ea144dcce7 Jason Gunthorpe 2020-05-01  267  				cpu_flags |= HMM_PFN_WRITE;
285e871884ff3d Leon Romanovsky 2025-04-28  268  			new_pfn_flags = swp_offset_pfn(entry) | cpu_flags;
285e871884ff3d Leon Romanovsky 2025-04-28  269  			goto out;
53f5c3f489ecdd Jérôme Glisse   2018-04-10  270  		}
53f5c3f489ecdd Jérôme Glisse   2018-04-10  271  
2733ea144dcce7 Jason Gunthorpe 2020-05-01  272  		required_fault =
2733ea144dcce7 Jason Gunthorpe 2020-05-01  273  			hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, 0);
285e871884ff3d Leon Romanovsky 2025-04-28  274  		if (!required_fault)
285e871884ff3d Leon Romanovsky 2025-04-28  275  			goto out;
76612d6ce4ccd2 Jason Gunthorpe 2020-02-28  276  
76612d6ce4ccd2 Jason Gunthorpe 2020-02-28  277  		if (!non_swap_entry(entry))
76612d6ce4ccd2 Jason Gunthorpe 2020-02-28  278  			goto fault;
76612d6ce4ccd2 Jason Gunthorpe 2020-02-28  279  
8a295dbbaf7292 Ralph Campbell  2022-07-25  280  		if (is_device_private_entry(entry))
8a295dbbaf7292 Ralph Campbell  2022-07-25  281  			goto fault;
8a295dbbaf7292 Ralph Campbell  2022-07-25  282  
b756a3b5e7ead8 Alistair Popple 2021-06-30  283  		if (is_device_exclusive_entry(entry))
b756a3b5e7ead8 Alistair Popple 2021-06-30  284  			goto fault;
b756a3b5e7ead8 Alistair Popple 2021-06-30  285  
53f5c3f489ecdd Jérôme Glisse   2018-04-10  286  		if (is_migration_entry(entry)) {
74eee180b935fc Jérôme Glisse   2017-09-08  287  			pte_unmap(ptep);
74eee180b935fc Jérôme Glisse   2017-09-08  288  			hmm_vma_walk->last = addr;
d2e8d551165ccb Ralph Campbell  2019-07-25  289  			migration_entry_wait(walk->mm, pmdp, addr);
73231612dc7c90 Jérôme Glisse   2019-05-13  290  			return -EBUSY;
74eee180b935fc Jérôme Glisse   2017-09-08  291  		}
53f5c3f489ecdd Jérôme Glisse   2018-04-10  292  
53f5c3f489ecdd Jérôme Glisse   2018-04-10  293  		/* Report error for everything else */
dfdc22078f3f06 Jason Gunthorpe 2020-02-28  294  		pte_unmap(ptep);
53f5c3f489ecdd Jérôme Glisse   2018-04-10  295  		return -EFAULT;
da4c3c735ea4dc Jérôme Glisse   2017-09-08  296  	}
da4c3c735ea4dc Jérôme Glisse   2017-09-08  297  
76612d6ce4ccd2 Jason Gunthorpe 2020-02-28  298  	cpu_flags = pte_to_hmm_pfn_flags(range, pte);
2733ea144dcce7 Jason Gunthorpe 2020-05-01  299  	required_fault =
2733ea144dcce7 Jason Gunthorpe 2020-05-01  300  		hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, cpu_flags);
a3eb13c1579ba9 Jason Gunthorpe 2020-03-27  301  	if (required_fault)
74eee180b935fc Jérôme Glisse   2017-09-08  302  		goto fault;
74eee180b935fc Jérôme Glisse   2017-09-08  303  
ac541f25037229 Ralph Campbell  2019-10-23  304  	/*
40550627492291 Jason Gunthorpe 2020-03-05  305  	 * Since each architecture defines a struct page for the zero page, just
40550627492291 Jason Gunthorpe 2020-03-05  306  	 * fall through and treat it like a normal page.
ac541f25037229 Ralph Campbell  2019-10-23  307  	 */
87c01d57fa23de Alistair Popple 2022-01-14  308  	if (!vm_normal_page(walk->vma, addr, pte) &&
4b42fb213678d2 Li Zhijian      2021-09-08  309  	    !is_zero_pfn(pte_pfn(pte))) {
2733ea144dcce7 Jason Gunthorpe 2020-05-01  310  		if (hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, 0)) {
40550627492291 Jason Gunthorpe 2020-03-05  311  			pte_unmap(ptep);
40550627492291 Jason Gunthorpe 2020-03-05  312  			return -EFAULT;
40550627492291 Jason Gunthorpe 2020-03-05  313  		}
285e871884ff3d Leon Romanovsky 2025-04-28  314  		new_pfn_flags = HMM_PFN_ERROR;
285e871884ff3d Leon Romanovsky 2025-04-28  315  		goto out;
ac541f25037229 Ralph Campbell  2019-10-23  316  	}
992de9a8b75116 Jérôme Glisse   2019-05-13  317  
285e871884ff3d Leon Romanovsky 2025-04-28  318  	new_pfn_flags = pte_pfn(pte) | cpu_flags;
285e871884ff3d Leon Romanovsky 2025-04-28  319  out:
285e871884ff3d Leon Romanovsky 2025-04-28  320  	*hmm_pfn = (*hmm_pfn & HMM_PFN_INOUT_FLAGS) | new_pfn_flags;
53f5c3f489ecdd Jérôme Glisse   2018-04-10  321  	return 0;
74eee180b935fc Jérôme Glisse   2017-09-08  322  
74eee180b935fc Jérôme Glisse   2017-09-08  323  fault:
74eee180b935fc Jérôme Glisse   2017-09-08  324  	pte_unmap(ptep);
5504ed29692faa Jérôme Glisse   2018-04-10  325  	/* Fault any virtual address we were asked to fault */
a3eb13c1579ba9 Jason Gunthorpe 2020-03-27  326  	return hmm_vma_fault(addr, end, required_fault, walk);
53f5c3f489ecdd Jérôme Glisse   2018-04-10  327  }
53f5c3f489ecdd Jérôme Glisse   2018-04-10  328  

:::::: The code at line 247 was first introduced by commit
:::::: 5c041f5d1f23d3a172dd0db3215634c484b4acd6 mm: teach core mm about pte markers

:::::: TO: Peter Xu <peterx@redhat.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

--
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:[~2026-09-29  5:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29  5:53 [android-common:android17-6.18 1/1] mm/hmm.c:247:6: error: call to undeclared function 'pte_none_mostly'; ISO C99 and later do not support implicit function declarations kernel test robot

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.