[bcain:bcain/qemu_boot 61/73] arch/hexagon/mm/init.c:200:23: error: use of undeclared identifier 'initial_boot_params'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all,dev.linux.lists.llvm
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux.git bcain/qemu_boot
head:   7196a17b7cc2f15ed74704ba70164832b84a1a42
commit: 00029c0cc1e12984035d2f6387de53addfacb922 [61/73] hexagon: harden adoption of a bootloader-provided DTB
config: hexagon-randconfig-001-20260717 (https://download.01.org/0day-ci/archive/20260718/[email protected]/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5c0dfced1adc55429e32b1db08570abd3a219d85)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260718/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> arch/hexagon/mm/init.c:200:23: error: use of undeclared identifier 'initial_boot_params'
     200 |         if (boot_dtb_phys && initial_boot_params)
         |                              ^~~~~~~~~~~~~~~~~~~
   arch/hexagon/mm/init.c:202:20: error: use of undeclared identifier 'initial_boot_params'
     202 |                                  fdt_totalsize(initial_boot_params));
         |                                                ^~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/initial_boot_params +200 arch/hexagon/mm/init.c

   188	
   189		memblock_add(PHYS_OFFSET,
   190			     (bootmem_lastpg - ARCH_PFN_OFFSET) << PAGE_SHIFT);
   191	
   192		/* Reserve kernel text/data/bss */
   193		memblock_reserve(PHYS_OFFSET,
   194				 (bootmem_startpg - ARCH_PFN_OFFSET) << PAGE_SHIFT);
   195	
   196		/*
   197		 * A bootloader-provided DTB sits in our RAM until it is
   198		 * unflattened; keep the allocator away from it.
   199		 */
 > 200		if (boot_dtb_phys && initial_boot_params)
   201			memblock_reserve(boot_dtb_phys,
   202					 fdt_totalsize(initial_boot_params));
   203		/*
   204		 * Reserve the top DMA_RESERVE bytes of RAM for DMA (uncached)
   205		 * memory allocation
   206		 */
   207		max_low_pfn = bootmem_lastpg - PFN_DOWN(DMA_RESERVED_BYTES);
   208		min_low_pfn = ARCH_PFN_OFFSET;
   209		memblock_reserve(PFN_PHYS(max_low_pfn), DMA_RESERVED_BYTES);
   210	
   211		printk(KERN_INFO "bootmem_startpg:  0x%08lx\n", bootmem_startpg);
   212		printk(KERN_INFO "bootmem_lastpg:  0x%08lx\n", bootmem_lastpg);
   213		printk(KERN_INFO "min_low_pfn:  0x%08lx\n", min_low_pfn);
   214		printk(KERN_INFO "max_low_pfn:  0x%08lx\n", max_low_pfn);
   215	
   216		/*
   217		 * The default VM page tables (will be) populated with
   218		 * VA=PA+PAGE_OFFSET mapping.  We go in and invalidate entries
   219		 * higher than what we have memory for.
   220		 */
   221	
   222		/*  this is pointer arithmetic; each entry covers 4MB  */
   223		segtable = segtable + (PAGE_OFFSET >> 22);
   224		//  probably should do something more graceful than this
   225	#ifdef CONFIG_HEXAGON_SPLIT_2GB
   226	#define KERNEL_BIGPAGES_GB (2)
   227	#else
   228	#define KERNEL_BIGPAGES_GB (1)
   229	#endif
   230	
   231		segtable_end = segtable + (KERNEL_BIGPAGES_GB<<(30-22));
   232	
   233		/*
   234		 * Move forward to the start of empty pages; take into account
   235		 * phys_offset shift.
   236		 */
   237	
   238		segtable += (bootmem_lastpg-ARCH_PFN_OFFSET)>>(22-PAGE_SHIFT);
   239		{
   240			int i;
   241			for (i = 1 ; i <= DMA_RESERVE ; i++)
   242				segtable[-i] = ((segtable[-i] & __HVM_PTE_PGMASK_4MB)
   243					| __HVM_PTE_R | __HVM_PTE_W | __HVM_PTE_X
   244					| __HEXAGON_C_UNC << 6
   245					| __HVM_PDE_S_4MB);
   246		}
   247	
   248		printk(KERN_INFO "clearing segtable from %p to %p\n", segtable,
   249			segtable_end);
   250		while (segtable < (segtable_end-8))
   251			*(segtable++) = __HVM_PDE_S_INVALID;
   252		/* stop the pointer at the device I/O 4MB page  */
   253	
   254		printk(KERN_INFO "segtable = %p (should be equal to _K_io_map; %p)\n",
   255			segtable, &_K_io_map);
   256	
   257		//  Should use set_pmd or whatever, but whatevs
   258		//  these are fixed 4k regardless of what the kernel is using for everything else
   259		*segtable = __pa(&_K_init_devicetable) | __HVM_PDE_S_4KB;
   260	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.