Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Brian Cain <brian.cain@oss.qualcomm.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [bcain:bcain/qemu_boot 61/62] arch/hexagon/mm/init.c:200:23: error: use of undeclared identifier 'initial_boot_params'
Date: Fri, 03 Jul 2026 10:39:11 +0800	[thread overview]
Message-ID: <202607031056.NzWE7jI9-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux.git bcain/qemu_boot
head:   a74f943885b7a0e655c7c47d4d02f852c12c1ce1
commit: 69ae2bd79fdcdf08cf389539f20a37d98ed42631 [61/62] hexagon: harden adoption of a bootloader-provided DTB
config: hexagon-allnoconfig (https://download.01.org/0day-ci/archive/20260703/202607031056.NzWE7jI9-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 0a2fb2a2269da0e2a3e230beb6cad39ca314db33)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260703/202607031056.NzWE7jI9-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607031056.NzWE7jI9-lkp@intel.com/

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

                 reply	other threads:[~2026-07-03  2:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202607031056.NzWE7jI9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brian.cain@oss.qualcomm.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox