Re: [PATCH v3 1/3] x86/mm/pat: Move follow_phys to pat-related file

From: kernel test robot
Date: Fri Jan 12 2024 - 09:56:09 EST


Hi Wupeng,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on tip/x86/mm tip/master linus/master v6.7 next-20240112]
[cannot apply to tip/auto-latest]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Wupeng-Ma/x86-mm-pat-Move-follow_phys-to-pat-related-file/20240111-201305
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20240111120929.2694440-2-mawupeng1%40huawei.com
patch subject: [PATCH v3 1/3] x86/mm/pat: Move follow_phys to pat-related file
config: i386-randconfig-012-20240112 (https://download.01.org/0day-ci/archive/20240112/202401122234.MfmlPf9b-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/202401122234.MfmlPf9b-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401122234.MfmlPf9b-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from include/linux/mm.h:29,
from include/linux/memblock.h:12,
from arch/x86/mm/pat/memtype.c:35:
arch/x86/mm/pat/memtype.c: In function 'follow_phys':
>> include/linux/pgtable.h:103:9: error: implicit declaration of function 'kunmap_local' [-Werror=implicit-function-declaration]
103 | kunmap_local((pte)); \
| ^~~~~~~~~~~~
include/linux/mm.h:2965:9: note: in expansion of macro 'pte_unmap'
2965 | pte_unmap(pte); \
| ^~~~~~~~~
arch/x86/mm/pat/memtype.c:976:9: note: in expansion of macro 'pte_unmap_unlock'
976 | pte_unmap_unlock(ptep, ptl);
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +/kunmap_local +103 include/linux/pgtable.h

974b9b2c68f3d3 Mike Rapoport 2020-06-08 98
0d940a9b270b92 Hugh Dickins 2023-06-08 99 #ifdef CONFIG_HIGHPTE
0d940a9b270b92 Hugh Dickins 2023-06-08 100 #define __pte_map(pmd, address) \
0d940a9b270b92 Hugh Dickins 2023-06-08 101 ((pte_t *)kmap_local_page(pmd_page(*(pmd))) + pte_index((address)))
0d940a9b270b92 Hugh Dickins 2023-06-08 102 #define pte_unmap(pte) do { \
0d940a9b270b92 Hugh Dickins 2023-06-08 @103 kunmap_local((pte)); \
a349d72fd9efc8 Hugh Dickins 2023-07-11 104 rcu_read_unlock(); \
0d940a9b270b92 Hugh Dickins 2023-06-08 105 } while (0)
974b9b2c68f3d3 Mike Rapoport 2020-06-08 106 #else
0d940a9b270b92 Hugh Dickins 2023-06-08 107 static inline pte_t *__pte_map(pmd_t *pmd, unsigned long address)
0d940a9b270b92 Hugh Dickins 2023-06-08 108 {
0d940a9b270b92 Hugh Dickins 2023-06-08 109 return pte_offset_kernel(pmd, address);
0d940a9b270b92 Hugh Dickins 2023-06-08 110 }
0d940a9b270b92 Hugh Dickins 2023-06-08 111 static inline void pte_unmap(pte_t *pte)
0d940a9b270b92 Hugh Dickins 2023-06-08 112 {
a349d72fd9efc8 Hugh Dickins 2023-07-11 113 rcu_read_unlock();
0d940a9b270b92 Hugh Dickins 2023-06-08 114 }
974b9b2c68f3d3 Mike Rapoport 2020-06-08 115 #endif
974b9b2c68f3d3 Mike Rapoport 2020-06-08 116

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki