tree:
git://git.infradead.org/users/hch/misc.git swiotlb-init-cleanup
head: f750d1f8e172aa6649e256f6aadefe27306599e2
commit: a0a4498af0ad453ae74f5152c8610c4a4b31fae5 [8/11] swiotlb: make the swiotlb_init
interface more useful
config: arm64-buildonly-randconfig-r002-20220217
(
https://download.01.org/0day-ci/archive/20220217/202202171918.nKSLWkqr-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.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
git remote add hch-misc
git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc swiotlb-init-cleanup
git checkout a0a4498af0ad453ae74f5152c8610c4a4b31fae5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=arm64 SHELL=/bin/bash
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/arm64/mm/init.c: In function 'mem_init':
> arch/arm64/mm/init.c:376:78: error: macro "PFN_DOWN"
passed 2 arguments, but takes just 1
376 | swiotlb_init(max_pfn >
PFN_DOWN(arm64_dma_phys_limit, SWIOTLB_VERBOSE);
| ^
In file included from include/asm-generic/memory_model.h:5,
from arch/arm64/include/asm/memory.h:367,
from arch/arm64/include/asm/thread_info.h:17,
from include/linux/thread_info.h:60,
from arch/arm64/include/asm/preempt.h:5,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/swap.h:5,
from arch/arm64/mm/init.c:12:
include/linux/pfn.h:20: note: macro "PFN_DOWN" defined here
20 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
|
> arch/arm64/mm/init.c:376:32: error: 'PFN_DOWN' undeclared
(first use in this function)
376 | swiotlb_init(max_pfn >
PFN_DOWN(arm64_dma_phys_limit, SWIOTLB_VERBOSE);
| ^~~~~~~~
arch/arm64/mm/init.c:376:32: note: each undeclared identifier is reported only once for
each function it appears in
> arch/arm64/mm/init.c:376:40: error: expected ')' before
';' token
376 | swiotlb_init(max_pfn >
PFN_DOWN(arm64_dma_phys_limit, SWIOTLB_VERBOSE);
| ~ ^
~
| )
> arch/arm64/mm/init.c:376:9: error: too few arguments to function
'swiotlb_init'
376 | swiotlb_init(max_pfn >
PFN_DOWN(arm64_dma_phys_limit, SWIOTLB_VERBOSE);
| ^~~~~~~~~~~~
In file included from include/linux/dma-direct.h:13,
from arch/arm64/mm/init.c:23:
include/linux/swiotlb.h:125:6: note: declared here
125 | void swiotlb_init(bool addressing_limited, unsigned int flags);
| ^~~~~~~~~~~~
> arch/arm64/mm/init.c:403:10: error: expected ';' before
'}' token
403 | }
| ^
| ;
404 | }
| ~
vim +/PFN_DOWN +376 arch/arm64/mm/init.c
368
369 /*
370 * mem_init() marks the free areas in the mem_map and tells us how much memory
371 * is free. This is done after various parts of the system have claimed their
372 * memory after the kernel image.
373 */
374 void __init mem_init(void)
375 {
376 swiotlb_init(max_pfn > PFN_DOWN(arm64_dma_phys_limit,
SWIOTLB_VERBOSE);
377
378 /* this will put all unused low memory onto the freelists */
379 memblock_free_all();
380
381 /*
382 * Check boundaries twice: Some fundamental inconsistencies can be
383 * detected at build time already.
384 */
385 #ifdef CONFIG_COMPAT
386 BUILD_BUG_ON(TASK_SIZE_32 > DEFAULT_MAP_WINDOW_64);
387 #endif
388
389 /*
390 * Selected page table levels should match when derived from
391 * scratch using the virtual address range and page size.
392 */
393 BUILD_BUG_ON(ARM64_HW_PGTABLE_LEVELS(CONFIG_ARM64_VA_BITS) !=
394 CONFIG_PGTABLE_LEVELS);
395
396 if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {
397 extern int sysctl_overcommit_memory;
398 /*
399 * On a machine this small we won't get anywhere without
400 * overcommit, so turn it on by default.
401 */
402 sysctl_overcommit_memory = OVERCOMMIT_ALWAYS;
403 }
404 }
405
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org