tree:
git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git for-kernelci
head: a67db182d2b2007db563e1c95519fabd15d52095
commit: a67db182d2b2007db563e1c95519fabd15d52095 [3/3] arm: extend pfn_valid to take into
accound freed memory map alignment
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
#
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git/commit/...
git remote add rppt-memblock
git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git
git fetch --no-tags rppt-memblock for-kernelci
git checkout a67db182d2b2007db563e1c95519fabd15d52095
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm/mm/init.c:97:13: warning: no previous prototype for 'setup_dma_zone'
[-Wmissing-prototypes]
97 | void __init setup_dma_zone(const struct machine_desc *mdesc)
| ^~~~~~~~~~~~~~
arch/arm/mm/init.c: In function 'pfn_valid':
> arch/arm/mm/init.c:143:25: error: expected ')' before
';' token
143 | pageblock_size);
| ^
| )
arch/arm/mm/init.c:141:5: note: to match this '('
141 | if (memblock_overlaps_region(&memblock.memory,
| ^
> arch/arm/mm/init.c:147:1: error: expected expression before
'}' token
147 | }
| ^
arch/arm/mm/init.c:147:1: error: control reaches end of non-void function
[-Werror=return-type]
147 | }
| ^
cc1: some warnings being treated as errors
vim +143 arch/arm/mm/init.c
123
124 #ifdef CONFIG_HAVE_ARCH_PFN_VALID
125 int pfn_valid(unsigned long pfn)
126 {
127 phys_addr_t addr = __pfn_to_phys(pfn);
128 unsigned long pageblock_size = PAGE_SIZE * pageblock_nr_pages;
129
130 if (__phys_to_pfn(addr) != pfn)
131 return 0;
132
133 if (memblock_is_map_memory(addr))
134 return 1;
135
136 /*
137 * If address less than pageblock_size bytes away from a present
138 * memory chunk there still will be a memory map entry for it
139 * because we round freed memory map to the pageblock boundaries
140 */
141 if (memblock_overlaps_region(&memblock.memory,
142 ALIGN_DOWN(addr, pageblock_size),
143 pageblock_size);
144 return 1;
145
146 return 0;
147 }
148 EXPORT_SYMBOL(pfn_valid);
149 #endif
150
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org