2022-10-13 14:26:20

by kernel test robot

[permalink] [raw]
Subject: [peterz-queue:x86/mm.pae 5/9] mm/khugepaged.c:865:16: error: implicit declaration of function 'pmd_read_atomic'

tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/mm.pae
head: ce0487547e80c85cd1deec9bce726a58110457fe
commit: 833e9fc96f63a8e37d78baad15362b5ad8baac3c [5/9] mm: Rename pmd_read_atomic()
config: x86_64-randconfig-a013
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=833e9fc96f63a8e37d78baad15362b5ad8baac3c
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue x86/mm.pae
git checkout 833e9fc96f63a8e37d78baad15362b5ad8baac3c
# 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 <[email protected]>

All errors (new ones prefixed by >>):

mm/khugepaged.c: In function 'find_pmd_or_thp_or_none':
>> mm/khugepaged.c:865:16: error: implicit declaration of function 'pmd_read_atomic' [-Werror=implicit-function-declaration]
865 | pmde = pmd_read_atomic(*pmd);
| ^~~~~~~~~~~~~~~
>> mm/khugepaged.c:865:16: error: incompatible types when assigning to type 'pmd_t' from type 'int'
cc1: some warnings being treated as errors


vim +/pmd_read_atomic +865 mm/khugepaged.c

b46e756f5e47031 Kirill A. Shutemov 2016-07-26 854
507228044236804 Zach O'Keefe 2022-07-06 855 static int find_pmd_or_thp_or_none(struct mm_struct *mm,
507228044236804 Zach O'Keefe 2022-07-06 856 unsigned long address,
507228044236804 Zach O'Keefe 2022-07-06 857 pmd_t **pmd)
507228044236804 Zach O'Keefe 2022-07-06 858 {
507228044236804 Zach O'Keefe 2022-07-06 859 pmd_t pmde;
507228044236804 Zach O'Keefe 2022-07-06 860
507228044236804 Zach O'Keefe 2022-07-06 861 *pmd = mm_find_pmd(mm, address);
507228044236804 Zach O'Keefe 2022-07-06 862 if (!*pmd)
507228044236804 Zach O'Keefe 2022-07-06 863 return SCAN_PMD_NULL;
507228044236804 Zach O'Keefe 2022-07-06 864
507228044236804 Zach O'Keefe 2022-07-06 @865 pmde = pmd_read_atomic(*pmd);
507228044236804 Zach O'Keefe 2022-07-06 866

:::::: The code at line 865 was first introduced by commit
:::::: 50722804423680488b8063f6cc9a451333bf6f9b mm/khugepaged: record SCAN_PMD_MAPPED when scan_pmd() finds hugepage

:::::: TO: Zach O'Keefe <[email protected]>
:::::: CC: Andrew Morton <[email protected]>

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


Attachments:
(No filename) (2.65 kB)
config (118.75 kB)
Download all attachments

2022-10-13 17:30:07

by Zach O'Keefe

[permalink] [raw]
Subject: Re: [peterz-queue:x86/mm.pae 5/9] mm/khugepaged.c:865:16: error: implicit declaration of function 'pmd_read_atomic'

Seems like this was just due to local "mm: Rename pmd_read_atomic()"
conflict after merging Linus's tree (which introduced another
pmd_read_atomic() callsite). Peter already seems to have rebased and
made the fix - thanks Peter.

2022-10-14 09:30:55

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [peterz-queue:x86/mm.pae 5/9] mm/khugepaged.c:865:16: error: implicit declaration of function 'pmd_read_atomic'

On Thu, Oct 13, 2022 at 10:15:13AM -0700, Zach O'Keefe wrote:
> Seems like this was just due to local "mm: Rename pmd_read_atomic()"
> conflict after merging Linus's tree (which introduced another
> pmd_read_atomic() callsite). Peter already seems to have rebased and
> made the fix - thanks Peter.

Yep, just needed a fixup. Patch applied but didn't build. Arguably I
should've compiled before pushing, but meh :-)