Subject: [powerpc:next-test 103/106] arch/powerpc/mm/book3s64/radix_pgtable.c:513:21: error: use of undeclared identifier 'SECTION_SIZE_BITS'

From: kernel test robot <[email-masked]>
Date: Sun, 19 Jul 2020 04:58:32 +0800

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head:   5fed3b3e21db21f9a7002426f456fd3a8a8c0772
commit: 21407f39b9d547da527ad5224c4323e1f62bb514 [103/106] powerpc/mm/radix: Create separate mappings for hot-plugged memory
config: powerpc-randconfig-r016-20200719 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        git checkout 21407f39b9d547da527ad5224c4323e1f62bb514
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email-masked]>

All errors (new ones prefixed by >>):

>> arch/powerpc/mm/book3s64/radix_pgtable.c:513:21: error: use of undeclared identifier 'SECTION_SIZE_BITS'
                   *mem_block_size = MIN_MEMORY_BLOCK_SIZE;
                                     ^
   include/linux/memory.h:24:43: note: expanded from macro 'MIN_MEMORY_BLOCK_SIZE'
   #define MIN_MEMORY_BLOCK_SIZE     (1UL << SECTION_SIZE_BITS)
                                             ^
   arch/powerpc/mm/book3s64/radix_pgtable.c:521:33: error: use of undeclared identifier 'SECTION_SIZE_BITS'
           unsigned long mem_block_size = MIN_MEMORY_BLOCK_SIZE;
                                          ^
   include/linux/memory.h:24:43: note: expanded from macro 'MIN_MEMORY_BLOCK_SIZE'
   #define MIN_MEMORY_BLOCK_SIZE     (1UL << SECTION_SIZE_BITS)
                                             ^
   2 errors generated.

vim +/SECTION_SIZE_BITS +513 arch/powerpc/mm/book3s64/radix_pgtable.c

   494	
   495	static int __init probe_memory_block_size(unsigned long node, const char *uname, int
   496						  depth, void *data)
   497	{
   498		unsigned long *mem_block_size = (unsigned long *)data;
   499		const __be64 *prop;
   500		int len;
   501	
   502		if (depth != 1)
   503			return 0;
   504	
   505		if (strcmp(uname, "ibm,dynamic-reconfiguration-memory"))
   506			return 0;
   507	
   508		prop = of_get_flat_dt_prop(node, "ibm,lmb-size", &len);
   509		if (!prop || len < sizeof(__be64))
   510			/*
   511			 * Nothing in the device tree
   512			 */
 > 513			*mem_block_size = MIN_MEMORY_BLOCK_SIZE;
   514		else
   515			*mem_block_size = be64_to_cpup(prop);
   516		return 1;
   517	}
   518	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email-masked]