All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gregory Price <gourry@gourry.net>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [gourryinverse:private_compression 48/60] mm/internal.h:1535:33: error: implicit declaration of function 'make_writable_device_private_entry'
Date: Sun, 22 Feb 2026 17:53:09 +0800	[thread overview]
Message-ID: <202602221734.cCodFOSw-lkp@intel.com> (raw)

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: sh-allnoconfig (https://download.01.org/0day-ci/archive/20260222/202602221734.cCodFOSw-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260222/202602221734.cCodFOSw-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/202602221734.cCodFOSw-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/filemap.c:54:
   mm/internal.h: In function 'folio_managed_fixup_migration_pte':
>> mm/internal.h:1535:33: error: implicit declaration of function 'make_writable_device_private_entry' [-Wimplicit-function-declaration]
    1535 |                         entry = make_writable_device_private_entry(
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/internal.h:1535:33: error: incompatible types when assigning to type 'softleaf_t' {aka 'swp_entry_t'} from type 'int'
>> mm/internal.h:1538:33: error: implicit declaration of function 'make_readable_device_private_entry' [-Wimplicit-function-declaration]
    1538 |                         entry = make_readable_device_private_entry(
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/internal.h:1538:33: error: incompatible types when assigning to type 'softleaf_t' {aka 'swp_entry_t'} from type 'int'
>> mm/internal.h:1540:23: error: implicit declaration of function 'softleaf_to_pte' [-Wimplicit-function-declaration]
    1540 |                 pte = softleaf_to_pte(entry);
         |                       ^~~~~~~~~~~~~~~
>> mm/internal.h:1540:23: error: incompatible types when assigning to type 'pte_t' from type 'int'
>> mm/internal.h:1543:21: error: implicit declaration of function 'pte_swp_uffd_wp'; did you mean 'pte_swp_uffd_wp_any'? [-Wimplicit-function-declaration]
    1543 |                 if (pte_swp_uffd_wp(old_pte))
         |                     ^~~~~~~~~~~~~~~
         |                     pte_swp_uffd_wp_any
>> mm/internal.h:1544:31: error: implicit declaration of function 'pte_swp_mkuffd_wp'; did you mean 'pte_swp_uffd_wp_any'? [-Wimplicit-function-declaration]
    1544 |                         pte = pte_swp_mkuffd_wp(pte);
         |                               ^~~~~~~~~~~~~~~~~
         |                               pte_swp_uffd_wp_any
   mm/internal.h:1544:31: error: incompatible types when assigning to type 'pte_t' from type 'int'


vim +/make_writable_device_private_entry +1535 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

                 reply	other threads:[~2026-02-22  9:53 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=202602221734.cCodFOSw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gourry@gourry.net \
    --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.