All of lore.kernel.org
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 154/159] mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison'
@ 2022-06-03  0:27 kernel test robot
  2022-06-03  2:10   ` HORIGUCHI NAOYA
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-06-03  0:27 UTC (permalink / raw)
  To: Naoya Horiguchi
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   1bdf44dbc966e31c635199d413ee064a7d320844
commit: d4edf38ab95397f32ae017848deeeb3b6d2c5bb7 [154/159] mm, hwpoison, hugetlb: introduce SUBPAGE_INDEX_HWPOISON to save raw error page
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20220603/202206030829.0eS2kZa0-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=d4edf38ab95397f32ae017848deeeb3b6d2c5bb7
        git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
        git fetch --no-tags akpm-mm mm-unstable
        git checkout d4edf38ab95397f32ae017848deeeb3b6d2c5bb7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   mm/memory-failure.c: In function '__get_huge_page_for_hwpoison':
>> mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison' [-Werror=implicit-function-declaration]
    1538 |         hugetlb_set_page_hwpoison(head, page);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/hugetlb_set_page_hwpoison +1538 mm/memory-failure.c

  1498	
  1499	/*
  1500	 * Called from hugetlb code with hugetlb_lock held.
  1501	 *
  1502	 * Return values:
  1503	 *   0             - free hugepage
  1504	 *   1             - in-use hugepage
  1505	 *   2             - not a hugepage
  1506	 *   -EBUSY        - the hugepage is busy (try to retry)
  1507	 *   -EHWPOISON    - the hugepage is already hwpoisoned
  1508	 */
  1509	int __get_huge_page_for_hwpoison(unsigned long pfn, int flags)
  1510	{
  1511		struct page *page = pfn_to_page(pfn);
  1512		struct page *head = compound_head(page);
  1513		int ret = 2;	/* fallback to normal page handling */
  1514		bool count_increased = false;
  1515	
  1516		if (!PageHeadHuge(head))
  1517			goto out;
  1518	
  1519		if (flags & MF_COUNT_INCREASED) {
  1520			ret = 1;
  1521			count_increased = true;
  1522		} else if (HPageFreed(head)) {
  1523			ret = 0;
  1524		} else if (HPageMigratable(head)) {
  1525			ret = get_page_unless_zero(head);
  1526			if (ret)
  1527				count_increased = true;
  1528		} else {
  1529			ret = -EBUSY;
  1530			goto out;
  1531		}
  1532	
  1533		if (TestSetPageHWPoison(head)) {
  1534			ret = -EHWPOISON;
  1535			goto out;
  1536		}
  1537	
> 1538		hugetlb_set_page_hwpoison(head, page);
  1539	
  1540		return ret;
  1541	out:
  1542		if (count_increased)
  1543			put_page(head);
  1544		return ret;
  1545	}
  1546	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [akpm-mm:mm-unstable 154/159] mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison'
  2022-06-03  0:27 [akpm-mm:mm-unstable 154/159] mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison' kernel test robot
@ 2022-06-03  2:10   ` HORIGUCHI NAOYA
  0 siblings, 0 replies; 3+ messages in thread
From: HORIGUCHI NAOYA(堀口 直也) @ 2022-06-03  2:10 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

On Fri, Jun 03, 2022 at 08:27:50AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   1bdf44dbc966e31c635199d413ee064a7d320844
> commit: d4edf38ab95397f32ae017848deeeb3b6d2c5bb7 [154/159] mm, hwpoison, hugetlb: introduce SUBPAGE_INDEX_HWPOISON to save raw error page
> config: x86_64-kexec (https://download.01.org/0day-ci/archive/20220603/202206030829.0eS2kZa0-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=d4edf38ab95397f32ae017848deeeb3b6d2c5bb7
>         git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
>         git fetch --no-tags akpm-mm mm-unstable
>         git checkout d4edf38ab95397f32ae017848deeeb3b6d2c5bb7
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>

Thank you!

> 
> All errors (new ones prefixed by >>):
> 
>    mm/memory-failure.c: In function '__get_huge_page_for_hwpoison':
> >> mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison' [-Werror=implicit-function-declaration]
>     1538 |         hugetlb_set_page_hwpoison(head, page);
>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors

__get_huge_page_for_hwpoison() is not needed when CONFIG_HUGETLB_PAGE is n,
so extending "#ifdef CONFIG_HUGETLB_PAG" to cover __get_huge_page_for_hwpoison()
would be a simple resolution.


diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ced033a99e19..31d7eff35acf 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1501,6 +1501,7 @@ static int try_to_split_thp_page(struct page *page, const char *msg)
 	return 0;
 }
 
+#ifdef CONFIG_HUGETLB_PAGE
 /*
  * Called from hugetlb code with hugetlb_lock held.
  *
@@ -1550,7 +1551,6 @@ int __get_huge_page_for_hwpoison(unsigned long pfn, int flags)
 	return ret;
 }
 
-#ifdef CONFIG_HUGETLB_PAGE
 /*
  * Taking refcount of hugetlb pages needs extra care about race conditions
  * with basic operations like hugepage allocation/free/demotion.

Thanks,
Naoya Horiguchi

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [akpm-mm:mm-unstable 154/159] mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison'
@ 2022-06-03  2:10   ` HORIGUCHI NAOYA
  0 siblings, 0 replies; 3+ messages in thread
From: HORIGUCHI NAOYA @ 2022-06-03  2:10 UTC (permalink / raw)
  To: kbuild-all

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

On Fri, Jun 03, 2022 at 08:27:50AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   1bdf44dbc966e31c635199d413ee064a7d320844
> commit: d4edf38ab95397f32ae017848deeeb3b6d2c5bb7 [154/159] mm, hwpoison, hugetlb: introduce SUBPAGE_INDEX_HWPOISON to save raw error page
> config: x86_64-kexec (https://download.01.org/0day-ci/archive/20220603/202206030829.0eS2kZa0-lkp(a)intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=d4edf38ab95397f32ae017848deeeb3b6d2c5bb7
>         git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
>         git fetch --no-tags akpm-mm mm-unstable
>         git checkout d4edf38ab95397f32ae017848deeeb3b6d2c5bb7
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>

Thank you!

> 
> All errors (new ones prefixed by >>):
> 
>    mm/memory-failure.c: In function '__get_huge_page_for_hwpoison':
> >> mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison' [-Werror=implicit-function-declaration]
>     1538 |         hugetlb_set_page_hwpoison(head, page);
>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors

__get_huge_page_for_hwpoison() is not needed when CONFIG_HUGETLB_PAGE is n,
so extending "#ifdef CONFIG_HUGETLB_PAG" to cover __get_huge_page_for_hwpoison()
would be a simple resolution.


diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ced033a99e19..31d7eff35acf 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1501,6 +1501,7 @@ static int try_to_split_thp_page(struct page *page, const char *msg)
 	return 0;
 }
 
+#ifdef CONFIG_HUGETLB_PAGE
 /*
  * Called from hugetlb code with hugetlb_lock held.
  *
@@ -1550,7 +1551,6 @@ int __get_huge_page_for_hwpoison(unsigned long pfn, int flags)
 	return ret;
 }
 
-#ifdef CONFIG_HUGETLB_PAGE
 /*
  * Taking refcount of hugetlb pages needs extra care about race conditions
  * with basic operations like hugepage allocation/free/demotion.

Thanks,
Naoya Horiguchi

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-03  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03  0:27 [akpm-mm:mm-unstable 154/159] mm/memory-failure.c:1538:9: error: implicit declaration of function 'hugetlb_set_page_hwpoison' kernel test robot
2022-06-03  2:10 ` HORIGUCHI NAOYA(堀口 直也)
2022-06-03  2:10   ` HORIGUCHI NAOYA

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.