Hi Masahiro, I love your patch! Perhaps something to improve: [auto build test WARNING on masahiroy-kbuild/for-next] [also build test WARNING on s390/features soc/for-next linus/master v6.0-rc6] [cannot apply to next-20220921] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Masahiro-Yamada/kbuild-move-Wundef-from-KBUILD_CFLAGS-to-KBUILD_CPPFLAGS/20220913-161447 base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next config: arm64-buildonly-randconfig-r003-20220922 (https://download.01.org/0day-ci/archive/20220923/202209231052.nj1STd5X-lkp@xxxxxxxxx/config) compiler: aarch64-linux-gcc (GCC) 12.1.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 # https://github.com/intel-lab-lkp/linux/commit/ccf1a82d3dedb27a2b1b21f64e09183b197e1f6f git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Masahiro-Yamada/kbuild-move-Wundef-from-KBUILD_CFLAGS-to-KBUILD_CPPFLAGS/20220913-161447 git checkout ccf1a82d3dedb27a2b1b21f64e09183b197e1f6f # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from arch/arm64/kernel/vmlinux.lds.S:65: >> arch/arm64/include/asm/kernel-pgtable.h:135:41: warning: "PMD_SHIFT" is not defined, evaluates to 0 [-Wundef] 135 | #define ARM64_MEMSTART_SHIFT PMD_SHIFT | ^~~~~~~~~ arch/arm64/include/asm/kernel-pgtable.h:144:5: note: in expansion of macro 'ARM64_MEMSTART_SHIFT' 144 | #if ARM64_MEMSTART_SHIFT < SECTION_SIZE_BITS | ^~~~~~~~~~~~~~~~~~~~ vim +/PMD_SHIFT +135 arch/arm64/include/asm/kernel-pgtable.h 87d1587bef394c Suzuki K. Poulose 2015-10-19 122 a7f8de168ace48 Ard Biesheuvel 2016-02-16 123 /* a7f8de168ace48 Ard Biesheuvel 2016-02-16 124 * To make optimal use of block mappings when laying out the linear a7f8de168ace48 Ard Biesheuvel 2016-02-16 125 * mapping, round down the base of physical memory to a size that can a7f8de168ace48 Ard Biesheuvel 2016-02-16 126 * be mapped efficiently, i.e., either PUD_SIZE (4k granule) or PMD_SIZE a7f8de168ace48 Ard Biesheuvel 2016-02-16 127 * (64k granule), or a multiple that can be mapped using contiguous bits a7f8de168ace48 Ard Biesheuvel 2016-02-16 128 * in the page tables: 32 * PMD_SIZE (16k granule) a7f8de168ace48 Ard Biesheuvel 2016-02-16 129 */ 06e9bf2fd9b372 Ard Biesheuvel 2016-03-30 130 #if defined(CONFIG_ARM64_4K_PAGES) 06e9bf2fd9b372 Ard Biesheuvel 2016-03-30 131 #define ARM64_MEMSTART_SHIFT PUD_SHIFT 06e9bf2fd9b372 Ard Biesheuvel 2016-03-30 132 #elif defined(CONFIG_ARM64_16K_PAGES) ca6ece6a76a8b5 Anshuman Khandual 2021-06-14 133 #define ARM64_MEMSTART_SHIFT CONT_PMD_SHIFT a7f8de168ace48 Ard Biesheuvel 2016-02-16 134 #else 06e9bf2fd9b372 Ard Biesheuvel 2016-03-30 @135 #define ARM64_MEMSTART_SHIFT PMD_SHIFT 06e9bf2fd9b372 Ard Biesheuvel 2016-03-30 136 #endif 06e9bf2fd9b372 Ard Biesheuvel 2016-03-30 137 -- 0-DAY CI Kernel Test Service https://01.org/lkp