tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git
memblock/iterators-cleanup/v3
head: 79aa683bcd0cf3e183949d9bcf5ec4052e65f74d
commit: 1c93b140be9943b8bf966dfb1dc20446003db166 [12/17] arch, drivers: replace
for_each_membock() with for_each_mem_range()
config: arm-randconfig-r016-20200810 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
3a34228bff6fdf45b50cb57cf5fb85d659eeb672)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout 1c93b140be9943b8bf966dfb1dc20446003db166
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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/pmsa-v7.c:264:2: error: incompatible pointer types
passing 'int *' to parameter of type 'u64 *' (aka 'unsigned long long
*') [-Werror,-Wincompatible-pointer-types]
for_each_mem_range(i,
®_start, ®_end) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:212:2: note: expanded from macro 'for_each_mem_range'
__for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:178:31: note: expanded from macro
'__for_each_mem_range'
for (i = 0, __next_mem_range(&i, nid, flags, type_a, type_b, \
^~
include/linux/memblock.h:125:28: note: passing argument to parameter 'idx'
here
void __next_mem_range(u64 *idx, int nid, enum memblock_flags flags,
^
> arch/arm/mm/pmsa-v7.c:264:2: error: incompatible pointer types
passing 'int *' to parameter of type 'u64 *' (aka 'unsigned long long
*') [-Werror,-Wincompatible-pointer-types]
for_each_mem_range(i,
®_start, ®_end) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:212:2: note: expanded from macro 'for_each_mem_range'
__for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:181:24: note: expanded from macro
'__for_each_mem_range'
__next_mem_range(&i, nid, flags, type_a, type_b, \
^~
include/linux/memblock.h:125:28: note: passing argument to parameter 'idx'
here
void __next_mem_range(u64 *idx, int nid, enum memblock_flags flags,
^
> arch/arm/mm/pmsa-v7.c:275:21: error: expected ';' after
expression
mem_end = reg_end
^
;
3 errors generated.
--
> arch/arm/mm/pmsa-v8.c:100:2: error: incompatible pointer types
passing 'int *' to parameter of type 'u64 *' (aka 'unsigned long long
*') [-Werror,-Wincompatible-pointer-types]
for_each_mem_range(i,
®_start, ®_end) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:212:2: note: expanded from macro 'for_each_mem_range'
__for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:178:31: note: expanded from macro
'__for_each_mem_range'
for (i = 0, __next_mem_range(&i, nid, flags, type_a, type_b, \
^~
include/linux/memblock.h:125:28: note: passing argument to parameter 'idx'
here
void __next_mem_range(u64 *idx, int nid, enum memblock_flags flags,
^
> arch/arm/mm/pmsa-v8.c:100:2: error: incompatible pointer types
passing 'int *' to parameter of type 'u64 *' (aka 'unsigned long long
*') [-Werror,-Wincompatible-pointer-types]
for_each_mem_range(i,
®_start, ®_end) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:212:2: note: expanded from macro 'for_each_mem_range'
__for_each_mem_range(i, &memblock.memory, NULL, NUMA_NO_NODE, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/memblock.h:181:24: note: expanded from macro
'__for_each_mem_range'
__next_mem_range(&i, nid, flags, type_a, type_b, \
^~
include/linux/memblock.h:125:28: note: passing argument to parameter 'idx'
here
void __next_mem_range(u64 *idx, int nid, enum memblock_flags flags,
^
2 errors generated.
vim +264 arch/arm/mm/pmsa-v7.c
263
264 for_each_mem_range(i, ®_start, ®_end) {
265 if (i == 0) {
266 phys_addr_t phys_offset = PHYS_OFFSET;
267
268 /*
269 * Initially only use memory continuous from
270 * PHYS_OFFSET */
271 if (reg_start != phys_offset)
272 panic("First memory bank must be contiguous from PHYS_OFFSET");
273
274 mem_start = reg_start;
275 mem_end = reg_end
276 specified_mem_size = mem_end
- mem_start;
277 } else {
278 /*
279 * memblock auto merges contiguous blocks, remove
280 * all blocks afterwards in one go (we can't remove
281 * blocks separately while iterating)
282 */
283 pr_notice("Ignoring RAM after %pa, memory at %pa ignored\n",
284 &mem_end, ®_start);
285 memblock_remove(reg_start, 0 - reg_start);
286 break;
287 }
288 }
289
290 memset(mem, 0, sizeof(mem));
291 num = allocate_region(mem_start, specified_mem_size, mem_max_regions, mem);
292
293 for (i = 0; i < num; i++) {
294 unsigned long subreg = mem[i].size / PMSAv7_NR_SUBREGS;
295
296 total_mem_size += mem[i].size - subreg * hweight_long(mem[i].subreg);
297
298 pr_debug("MPU: base %pa size %pa disable subregions: %*pbl\n",
299 &mem[i].base, &mem[i].size, PMSAv7_NR_SUBREGS, &mem[i].subreg);
300 }
301
302 if (total_mem_size != specified_mem_size) {
303 pr_warn("Truncating memory from %pa to %pa (MPU region constraints)",
304 &specified_mem_size, &total_mem_size);
305 memblock_remove(mem_start + total_mem_size,
306 specified_mem_size - total_mem_size);
307 }
308 }
309
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org