* [gourryinverse:private_compression 48/60] mm/internal.h:1534:7: error: call to undeclared function 'pte_write'; ISO C99 and later do not support implicit function declarations
@ 2026-02-22 8:52 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-02-22 8:52 UTC (permalink / raw)
To: Gregory Price; +Cc: llvm, oe-kbuild-all
tree: https://github.com/gourryinverse/linux private_compression
head: 9fa5ffee4fd4726e31f05deebb938cccfa0b460f
commit: 48a8ea8dcaa2781e2ab529cf440334d15dca5512 [48/60] mm/mprotect: NP_OPS_PROTECT_WRITE - gate PTE/PMD write-upgrades
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20260222/202602221615.CP75D6Df-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e86750b29fa0ff207cd43213d66dabe565417638)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260222/202602221615.CP75D6Df-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/202602221615.CP75D6Df-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from mm/filemap.c:54:
>> mm/internal.h:1534:7: error: call to undeclared function 'pte_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1534 | if (pte_write(pte))
| ^
mm/internal.h:1534:7: note: did you mean 'pgd_write'?
include/linux/hugetlb.h:475:19: note: 'pgd_write' declared here
475 | static inline int pgd_write(pgd_t pgd)
| ^
In file included from mm/filemap.c:54:
>> mm/internal.h:1535:12: error: call to undeclared function 'make_writable_device_private_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1535 | entry = make_writable_device_private_entry(
| ^
>> mm/internal.h:1535:10: error: assigning to 'softleaf_t' (aka 'swp_entry_t') from incompatible type 'int'
1535 | entry = make_writable_device_private_entry(
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1536 | page_to_pfn(new));
| ~~~~~~~~~~~~~~~~~
>> mm/internal.h:1538:12: error: call to undeclared function 'make_readable_device_private_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1538 | entry = make_readable_device_private_entry(
| ^
mm/internal.h:1538:10: error: assigning to 'softleaf_t' (aka 'swp_entry_t') from incompatible type 'int'
1538 | entry = make_readable_device_private_entry(
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1539 | page_to_pfn(new));
| ~~~~~~~~~~~~~~~~~
>> mm/internal.h:1540:9: error: call to undeclared function 'softleaf_to_pte'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1540 | pte = softleaf_to_pte(entry);
| ^
>> mm/internal.h:1543:7: error: call to undeclared function 'pte_swp_uffd_wp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1543 | if (pte_swp_uffd_wp(old_pte))
| ^
mm/internal.h:1543:7: note: did you mean 'pte_swp_uffd_wp_any'?
include/linux/userfaultfd_k.h:463:20: note: 'pte_swp_uffd_wp_any' declared here
463 | static inline bool pte_swp_uffd_wp_any(pte_t pte)
| ^
In file included from mm/filemap.c:54:
>> mm/internal.h:1544:10: error: call to undeclared function 'pte_swp_mkuffd_wp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1544 | pte = pte_swp_mkuffd_wp(pte);
| ^
>> mm/internal.h:1546:9: error: call to undeclared function 'pte_wrprotect'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1546 | pte = pte_wrprotect(pte);
| ^
9 errors generated.
--
In file included from mm/oom_kill.c:50:
>> mm/internal.h:1534:7: error: call to undeclared function 'pte_write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1534 | if (pte_write(pte))
| ^
>> mm/internal.h:1535:12: error: call to undeclared function 'make_writable_device_private_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1535 | entry = make_writable_device_private_entry(
| ^
>> mm/internal.h:1535:10: error: assigning to 'softleaf_t' (aka 'swp_entry_t') from incompatible type 'int'
1535 | entry = make_writable_device_private_entry(
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1536 | page_to_pfn(new));
| ~~~~~~~~~~~~~~~~~
>> mm/internal.h:1538:12: error: call to undeclared function 'make_readable_device_private_entry'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1538 | entry = make_readable_device_private_entry(
| ^
mm/internal.h:1538:10: error: assigning to 'softleaf_t' (aka 'swp_entry_t') from incompatible type 'int'
1538 | entry = make_readable_device_private_entry(
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1539 | page_to_pfn(new));
| ~~~~~~~~~~~~~~~~~
>> mm/internal.h:1540:9: error: call to undeclared function 'softleaf_to_pte'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1540 | pte = softleaf_to_pte(entry);
| ^
>> mm/internal.h:1543:7: error: call to undeclared function 'pte_swp_uffd_wp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1543 | if (pte_swp_uffd_wp(old_pte))
| ^
mm/internal.h:1543:7: note: did you mean 'pte_swp_uffd_wp_any'?
include/linux/userfaultfd_k.h:463:20: note: 'pte_swp_uffd_wp_any' declared here
463 | static inline bool pte_swp_uffd_wp_any(pte_t pte)
| ^
In file included from mm/oom_kill.c:50:
>> mm/internal.h:1544:10: error: call to undeclared function 'pte_swp_mkuffd_wp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1544 | pte = pte_swp_mkuffd_wp(pte);
| ^
>> mm/internal.h:1546:9: error: call to undeclared function 'pte_wrprotect'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1546 | pte = pte_wrprotect(pte);
| ^
9 errors generated.
vim +/pte_write +1534 mm/internal.h
1509
1510 /**
1511 * folio_managed_fixup_migration_pte - Fixup PTE after migration for
1512 * managed memory pages.
1513 * @new: the destination page
1514 * @pte: the PTE being installed (normal PTE built by caller)
1515 * @old_pte: the original PTE (before migration, for swap entry flags)
1516 * @vma: the VMA
1517 *
1518 * For MEMORY_DEVICE_PRIVATE pages: replaces the PTE with a device-private
1519 * swap entry, preserving soft_dirty and uffd_wp from old_pte.
1520 *
1521 * For N_MEMORY_PRIVATE pages with NP_OPS_PROTECT_WRITE: strips the write
1522 * bit so the next write triggers the fault handler for promotion.
1523 *
1524 * For normal pages: returns pte unmodified.
1525 */
1526 static inline pte_t folio_managed_fixup_migration_pte(struct page *new,
1527 pte_t pte,
1528 pte_t old_pte,
1529 struct vm_area_struct *vma)
1530 {
1531 if (unlikely(is_device_private_page(new))) {
1532 softleaf_t entry;
1533
> 1534 if (pte_write(pte))
> 1535 entry = make_writable_device_private_entry(
1536 page_to_pfn(new));
1537 else
> 1538 entry = make_readable_device_private_entry(
1539 page_to_pfn(new));
> 1540 pte = softleaf_to_pte(entry);
1541 if (pte_swp_soft_dirty(old_pte))
1542 pte = pte_swp_mksoft_dirty(pte);
> 1543 if (pte_swp_uffd_wp(old_pte))
> 1544 pte = pte_swp_mkuffd_wp(pte);
1545 } else if (folio_managed_wrprotect(page_folio(new))) {
> 1546 pte = pte_wrprotect(pte);
1547 }
1548 return pte;
1549 }
1550
--
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-02-22 8:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-22 8:52 [gourryinverse:private_compression 48/60] mm/internal.h:1534:7: error: call to undeclared function 'pte_write'; 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.