All of lore.kernel.org
 help / color / mirror / Atom feed
* [arm-integrator:kernel-in-vmalloc-v5.11-rc1 4/4] arch/arm/mm/init.c:229:8: error: use of undeclared identifier 'SECTION_SIZE'
@ 2021-04-12 19:36 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-12 19:36 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 9976 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v5.11-rc1
head:   11e0a781454290894392dc9dbdde64ba756cbdaa
commit: 11e0a781454290894392dc9dbdde64ba756cbdaa [4/4] First stab
config: arm-randconfig-r013-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/commit/?id=11e0a781454290894392dc9dbdde64ba756cbdaa
        git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
        git fetch --no-tags arm-integrator kernel-in-vmalloc-v5.11-rc1
        git checkout 11e0a781454290894392dc9dbdde64ba756cbdaa
        # 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@intel.com>

All error/warnings (new ones prefixed by >>):

   arch/arm/mm/init.c:97:13: warning: no previous prototype for function 'setup_dma_zone' [-Wmissing-prototypes]
   void __init setup_dma_zone(const struct machine_desc *mdesc)
               ^
   arch/arm/mm/init.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __init setup_dma_zone(const struct machine_desc *mdesc)
   ^
   static 
>> arch/arm/mm/init.c:229:8: error: use of undeclared identifier 'SECTION_SIZE'
                                             SECTION_SIZE));
                                             ^
   arch/arm/mm/init.c:309:13: warning: no previous prototype for function 'mem_init_print_arm_info' [-Wmissing-prototypes]
   void __init mem_init_print_arm_info(void)
               ^
   arch/arm/mm/init.c:309:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __init mem_init_print_arm_info(void)
   ^
   static 
   2 warnings and 1 error generated.
--
>> mm/gup.c:1495:28: warning: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *' [-Wint-conversion]
                           pages[i] = virt_to_page(start);
                                                   ^~~~~
   arch/arm/include/asm/memory.h:449:53: note: expanded from macro 'virt_to_page'
   #define virt_to_page(kaddr)     pfn_to_page(virt_to_pfn(kaddr))
                                                           ^~~~~
   include/asm-generic/memory_model.h:33:41: note: expanded from macro '__pfn_to_page'
   #define __pfn_to_page(pfn)      (mem_map + ((pfn) - ARCH_PFN_OFFSET))
                                                ^~~
   arch/arm/include/asm/memory.h:331:53: note: passing argument to parameter 'kaddr' here
   static inline unsigned long virt_to_pfn(const void *kaddr)
                                                       ^
   1 warning generated.
--
>> mm/nommu.c:512:36: warning: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *' [-Wint-conversion]
                   struct page *page = virt_to_page(from);
                                                    ^~~~
   arch/arm/include/asm/memory.h:449:53: note: expanded from macro 'virt_to_page'
   #define virt_to_page(kaddr)     pfn_to_page(virt_to_pfn(kaddr))
                                                           ^~~~~
   include/asm-generic/memory_model.h:33:41: note: expanded from macro '__pfn_to_page'
   #define __pfn_to_page(pfn)      (mem_map + ((pfn) - ARCH_PFN_OFFSET))
                                                ^~~
   arch/arm/include/asm/memory.h:331:53: note: passing argument to parameter 'kaddr' here
   static inline unsigned long virt_to_pfn(const void *kaddr)
                                                       ^
   mm/nommu.c:1658:15: warning: no previous prototype for function 'arch_get_unmapped_area' [-Wmissing-prototypes]
   unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr,
                 ^
   mm/nommu.c:1658:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr,
   ^
   static 
   2 warnings generated.


vim +/SECTION_SIZE +229 arch/arm/mm/init.c

    96	
  > 97	void __init setup_dma_zone(const struct machine_desc *mdesc)
    98	{
    99	#ifdef CONFIG_ZONE_DMA
   100		if (mdesc->dma_zone_size) {
   101			arm_dma_zone_size = mdesc->dma_zone_size;
   102			arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
   103		} else
   104			arm_dma_limit = 0xffffffff;
   105		arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT;
   106	#endif
   107	}
   108	
   109	static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
   110		unsigned long max_high)
   111	{
   112		unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
   113	
   114	#ifdef CONFIG_ZONE_DMA
   115		max_zone_pfn[ZONE_DMA] = min(arm_dma_pfn_limit, max_low);
   116	#endif
   117		max_zone_pfn[ZONE_NORMAL] = max_low;
   118	#ifdef CONFIG_HIGHMEM
   119		max_zone_pfn[ZONE_HIGHMEM] = max_high;
   120	#endif
   121		free_area_init(max_zone_pfn);
   122	}
   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	
   129		if (__phys_to_pfn(addr) != pfn)
   130			return 0;
   131	
   132		return memblock_is_map_memory(addr);
   133	}
   134	EXPORT_SYMBOL(pfn_valid);
   135	#endif
   136	
   137	static bool arm_memblock_steal_permitted = true;
   138	
   139	phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
   140	{
   141		phys_addr_t phys;
   142	
   143		BUG_ON(!arm_memblock_steal_permitted);
   144	
   145		phys = memblock_phys_alloc(size, align);
   146		if (!phys)
   147			panic("Failed to steal %pa bytes at %pS\n",
   148			      &size, (void *)_RET_IP_);
   149	
   150		memblock_free(phys, size);
   151		memblock_remove(phys, size);
   152	
   153		return phys;
   154	}
   155	
   156	static void __init arm_initrd_init(void)
   157	{
   158	#ifdef CONFIG_BLK_DEV_INITRD
   159		phys_addr_t start;
   160		unsigned long size;
   161	
   162		initrd_start = initrd_end = 0;
   163	
   164		if (!phys_initrd_size)
   165			return;
   166	
   167		/*
   168		 * Round the memory region to page boundaries as per free_initrd_mem()
   169		 * This allows us to detect whether the pages overlapping the initrd
   170		 * are in use, but more importantly, reserves the entire set of pages
   171		 * as we don't want these pages allocated for other purposes.
   172		 */
   173		start = round_down(phys_initrd_start, PAGE_SIZE);
   174		size = phys_initrd_size + (phys_initrd_start - start);
   175		size = round_up(size, PAGE_SIZE);
   176	
   177		if (!memblock_is_region_memory(start, size)) {
   178			pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",
   179			       (u64)start, size);
   180			return;
   181		}
   182	
   183		if (memblock_is_region_reserved(start, size)) {
   184			pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region - disabling initrd\n",
   185			       (u64)start, size);
   186			return;
   187		}
   188	
   189		memblock_reserve(start, size);
   190	
   191		/* Now convert initrd to virtual addresses */
   192		initrd_start = __phys_to_virt(phys_initrd_start);
   193		initrd_end = initrd_start + phys_initrd_size;
   194	#endif
   195	}
   196	
   197	#ifdef CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND
   198	void check_cpu_icache_size(int cpuid)
   199	{
   200		u32 size, ctr;
   201	
   202		asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctr));
   203	
   204		size = 1 << ((ctr & 0xf) + 2);
   205		if (cpuid != 0 && icache_size != size)
   206			pr_info("CPU%u: detected I-Cache line size mismatch, workaround enabled\n",
   207				cpuid);
   208		if (icache_size > size)
   209			icache_size = size;
   210	}
   211	#endif
   212	
   213	void __init arm_memblock_init(const struct machine_desc *mdesc)
   214	{
   215		/*
   216		 * Register the kernel text, kernel data and initrd with memblock.
   217		 *
   218		 * When using kernel in vmalloc, we have to round up to the closest
   219		 * section size, or the temporary section mapping of the tail of the
   220		 * kernel will be overwritten by memblock allocations. This is not
   221		 * a problem with the linear kernel map, since the allocations can
   222		 * use the 1:1 map in that case.
   223		 */
   224		if (!IS_ENABLED(CONFIG_ARM_KERNEL_IN_VMALLOC))
   225			memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
   226		else
   227			memblock_reserve(__pa(KERNEL_START),
   228					 round_up(KERNEL_END - KERNEL_START,
 > 229						  SECTION_SIZE));
   230	
   231		arm_initrd_init();
   232	
   233		arm_mm_memblock_reserve();
   234	
   235		/* reserve any platform specific memblock areas */
   236		if (mdesc->reserve)
   237			mdesc->reserve();
   238	
   239		early_init_fdt_scan_reserved_mem();
   240	
   241		/* reserve memory for DMA contiguous allocations */
   242		dma_contiguous_reserve(arm_dma_limit);
   243	
   244		arm_memblock_steal_permitted = false;
   245		memblock_dump_all();
   246	}
   247	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29271 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-12 19:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 19:36 [arm-integrator:kernel-in-vmalloc-v5.11-rc1 4/4] arch/arm/mm/init.c:229:8: error: use of undeclared identifier 'SECTION_SIZE' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.