All of lore.kernel.org
 help / color / mirror / Atom feed
* [hch-misc:dax-include-fix 1/1] mm/memory-failure.c:1548:11: error: implicit declaration of function 'dax_lock_page'
@ 2021-08-27  1:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-27  1:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 9784 bytes --]

tree:   git://git.infradead.org/users/hch/misc.git dax-include-fix
head:   87a0d664932cb001488b33263cbd48725871fd77
commit: 87a0d664932cb001488b33263cbd48725871fd77 [1/1] mm: don't include <linux/dax.h> in <linux/mempolicy.h>
config: x86_64-randconfig-a013-20210826 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project ea08c4cd1c0869ec5024a8bb3f5cdf06ab03ae83)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add hch-misc git://git.infradead.org/users/hch/misc.git
        git fetch --no-tags hch-misc dax-include-fix
        git checkout 87a0d664932cb001488b33263cbd48725871fd77
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   mm/memory-failure.c:1527:2: error: unknown type name 'dax_entry_t'; did you mean 'swp_entry_t'?
           dax_entry_t cookie;
           ^~~~~~~~~~~
           swp_entry_t
   include/linux/mm_types.h:802:3: note: 'swp_entry_t' declared here
   } swp_entry_t;
     ^
>> mm/memory-failure.c:1548:11: error: implicit declaration of function 'dax_lock_page' [-Werror,-Wimplicit-function-declaration]
           cookie = dax_lock_page(page);
                    ^
   mm/memory-failure.c:1548:11: note: did you mean '__lock_page'?
   include/linux/pagemap.h:603:13: note: '__lock_page' declared here
   extern void __lock_page(struct page *page);
               ^
>> mm/memory-failure.c:1548:9: error: assigning to 'swp_entry_t' from incompatible type 'int'
           cookie = dax_lock_page(page);
                  ^ ~~~~~~~~~~~~~~~~~~~
>> mm/memory-failure.c:1549:6: error: invalid argument type 'swp_entry_t' to unary expression
           if (!cookie)
               ^~~~~~~
>> mm/memory-failure.c:1596:2: error: implicit declaration of function 'dax_unlock_page' [-Werror,-Wimplicit-function-declaration]
           dax_unlock_page(page, cookie);
           ^
   mm/memory-failure.c:1596:2: note: did you mean 'dax_lock_page'?
   mm/memory-failure.c:1548:11: note: 'dax_lock_page' declared here
           cookie = dax_lock_page(page);
                    ^
   5 errors generated.


vim +/dax_lock_page +1548 mm/memory-failure.c

761ad8d7c7b548 Naoya Horiguchi   2017-07-10  1516  
6100e34b2526e1 Dan Williams      2018-07-13  1517  static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
6100e34b2526e1 Dan Williams      2018-07-13  1518  		struct dev_pagemap *pgmap)
6100e34b2526e1 Dan Williams      2018-07-13  1519  {
6100e34b2526e1 Dan Williams      2018-07-13  1520  	struct page *page = pfn_to_page(pfn);
6100e34b2526e1 Dan Williams      2018-07-13  1521  	const bool unmap_success = true;
6100e34b2526e1 Dan Williams      2018-07-13  1522  	unsigned long size = 0;
6100e34b2526e1 Dan Williams      2018-07-13  1523  	struct to_kill *tk;
6100e34b2526e1 Dan Williams      2018-07-13  1524  	LIST_HEAD(tokill);
6100e34b2526e1 Dan Williams      2018-07-13  1525  	int rc = -EBUSY;
6100e34b2526e1 Dan Williams      2018-07-13  1526  	loff_t start;
27359fd6e5f3c5 Matthew Wilcox    2018-11-30 @1527  	dax_entry_t cookie;
6100e34b2526e1 Dan Williams      2018-07-13  1528  
1e8aaedb182d6d Oscar Salvador    2020-12-14  1529  	if (flags & MF_COUNT_INCREASED)
1e8aaedb182d6d Oscar Salvador    2020-12-14  1530  		/*
1e8aaedb182d6d Oscar Salvador    2020-12-14  1531  		 * Drop the extra refcount in case we come from madvise().
1e8aaedb182d6d Oscar Salvador    2020-12-14  1532  		 */
1e8aaedb182d6d Oscar Salvador    2020-12-14  1533  		put_page(page);
1e8aaedb182d6d Oscar Salvador    2020-12-14  1534  
34dc45be4563f3 Dan Williams      2021-02-25  1535  	/* device metadata space is not recoverable */
34dc45be4563f3 Dan Williams      2021-02-25  1536  	if (!pgmap_pfn_valid(pgmap, pfn)) {
34dc45be4563f3 Dan Williams      2021-02-25  1537  		rc = -ENXIO;
34dc45be4563f3 Dan Williams      2021-02-25  1538  		goto out;
34dc45be4563f3 Dan Williams      2021-02-25  1539  	}
34dc45be4563f3 Dan Williams      2021-02-25  1540  
6100e34b2526e1 Dan Williams      2018-07-13  1541  	/*
6100e34b2526e1 Dan Williams      2018-07-13  1542  	 * Prevent the inode from being freed while we are interrogating
6100e34b2526e1 Dan Williams      2018-07-13  1543  	 * the address_space, typically this would be handled by
6100e34b2526e1 Dan Williams      2018-07-13  1544  	 * lock_page(), but dax pages do not use the page lock. This
6100e34b2526e1 Dan Williams      2018-07-13  1545  	 * also prevents changes to the mapping of this pfn until
6100e34b2526e1 Dan Williams      2018-07-13  1546  	 * poison signaling is complete.
6100e34b2526e1 Dan Williams      2018-07-13  1547  	 */
27359fd6e5f3c5 Matthew Wilcox    2018-11-30 @1548  	cookie = dax_lock_page(page);
27359fd6e5f3c5 Matthew Wilcox    2018-11-30 @1549  	if (!cookie)
6100e34b2526e1 Dan Williams      2018-07-13  1550  		goto out;
6100e34b2526e1 Dan Williams      2018-07-13  1551  
6100e34b2526e1 Dan Williams      2018-07-13  1552  	if (hwpoison_filter(page)) {
6100e34b2526e1 Dan Williams      2018-07-13  1553  		rc = 0;
6100e34b2526e1 Dan Williams      2018-07-13  1554  		goto unlock;
6100e34b2526e1 Dan Williams      2018-07-13  1555  	}
6100e34b2526e1 Dan Williams      2018-07-13  1556  
25b2995a35b609 Christoph Hellwig 2019-06-13  1557  	if (pgmap->type == MEMORY_DEVICE_PRIVATE) {
6100e34b2526e1 Dan Williams      2018-07-13  1558  		/*
6100e34b2526e1 Dan Williams      2018-07-13  1559  		 * TODO: Handle HMM pages which may need coordination
6100e34b2526e1 Dan Williams      2018-07-13  1560  		 * with device-side memory.
6100e34b2526e1 Dan Williams      2018-07-13  1561  		 */
6100e34b2526e1 Dan Williams      2018-07-13  1562  		goto unlock;
6100e34b2526e1 Dan Williams      2018-07-13  1563  	}
6100e34b2526e1 Dan Williams      2018-07-13  1564  
6100e34b2526e1 Dan Williams      2018-07-13  1565  	/*
6100e34b2526e1 Dan Williams      2018-07-13  1566  	 * Use this flag as an indication that the dax page has been
6100e34b2526e1 Dan Williams      2018-07-13  1567  	 * remapped UC to prevent speculative consumption of poison.
6100e34b2526e1 Dan Williams      2018-07-13  1568  	 */
6100e34b2526e1 Dan Williams      2018-07-13  1569  	SetPageHWPoison(page);
6100e34b2526e1 Dan Williams      2018-07-13  1570  
6100e34b2526e1 Dan Williams      2018-07-13  1571  	/*
6100e34b2526e1 Dan Williams      2018-07-13  1572  	 * Unlike System-RAM there is no possibility to swap in a
6100e34b2526e1 Dan Williams      2018-07-13  1573  	 * different physical page at a given virtual address, so all
6100e34b2526e1 Dan Williams      2018-07-13  1574  	 * userspace consumption of ZONE_DEVICE memory necessitates
6100e34b2526e1 Dan Williams      2018-07-13  1575  	 * SIGBUS (i.e. MF_MUST_KILL)
6100e34b2526e1 Dan Williams      2018-07-13  1576  	 */
6100e34b2526e1 Dan Williams      2018-07-13  1577  	flags |= MF_ACTION_REQUIRED | MF_MUST_KILL;
6100e34b2526e1 Dan Williams      2018-07-13  1578  	collect_procs(page, &tokill, flags & MF_ACTION_REQUIRED);
6100e34b2526e1 Dan Williams      2018-07-13  1579  
6100e34b2526e1 Dan Williams      2018-07-13  1580  	list_for_each_entry(tk, &tokill, nd)
6100e34b2526e1 Dan Williams      2018-07-13  1581  		if (tk->size_shift)
6100e34b2526e1 Dan Williams      2018-07-13  1582  			size = max(size, 1UL << tk->size_shift);
6100e34b2526e1 Dan Williams      2018-07-13  1583  	if (size) {
6100e34b2526e1 Dan Williams      2018-07-13  1584  		/*
6100e34b2526e1 Dan Williams      2018-07-13  1585  		 * Unmap the largest mapping to avoid breaking up
6100e34b2526e1 Dan Williams      2018-07-13  1586  		 * device-dax mappings which are constant size. The
6100e34b2526e1 Dan Williams      2018-07-13  1587  		 * actual size of the mapping being torn down is
6100e34b2526e1 Dan Williams      2018-07-13  1588  		 * communicated in siginfo, see kill_proc()
6100e34b2526e1 Dan Williams      2018-07-13  1589  		 */
6100e34b2526e1 Dan Williams      2018-07-13  1590  		start = (page->index << PAGE_SHIFT) & ~(size - 1);
4d75136be8bf3a Jane Chu          2021-04-29  1591  		unmap_mapping_range(page->mapping, start, size, 0);
6100e34b2526e1 Dan Williams      2018-07-13  1592  	}
6100e34b2526e1 Dan Williams      2018-07-13  1593  	kill_procs(&tokill, flags & MF_MUST_KILL, !unmap_success, pfn, flags);
6100e34b2526e1 Dan Williams      2018-07-13  1594  	rc = 0;
6100e34b2526e1 Dan Williams      2018-07-13  1595  unlock:
27359fd6e5f3c5 Matthew Wilcox    2018-11-30 @1596  	dax_unlock_page(page, cookie);
6100e34b2526e1 Dan Williams      2018-07-13  1597  out:
6100e34b2526e1 Dan Williams      2018-07-13  1598  	/* drop pgmap ref acquired in caller */
6100e34b2526e1 Dan Williams      2018-07-13  1599  	put_dev_pagemap(pgmap);
6100e34b2526e1 Dan Williams      2018-07-13  1600  	action_result(pfn, MF_MSG_DAX, rc ? MF_FAILED : MF_RECOVERED);
6100e34b2526e1 Dan Williams      2018-07-13  1601  	return rc;
6100e34b2526e1 Dan Williams      2018-07-13  1602  }
6100e34b2526e1 Dan Williams      2018-07-13  1603  

:::::: The code at line 1548 was first introduced by commit
:::::: 27359fd6e5f3c5db8fe544b63238b6170e8806d8 dax: Fix unlock mismatch with updated API

:::::: TO: Matthew Wilcox <willy@infradead.org>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39704 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-27  1:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-27  1:39 [hch-misc:dax-include-fix 1/1] mm/memory-failure.c:1548:11: error: implicit declaration of function 'dax_lock_page' 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.