Content-Type: multipart/mixed; boundary="===============3262097127229305126==" MIME-Version: 1.0 From: chenzhou To: kbuild-all@lists.01.org Subject: Re: [PATCH v13 4/8] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c Date: Thu, 12 Nov 2020 16:17:01 +0800 Message-ID: In-Reply-To: <202011112150.DaXyC7Fg-lkp@intel.com> List-Id: --===============3262097127229305126== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi all, On 2020/11/11 21:20, kernel test robot wrote: > Hi Chen, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on tip/master] > [also build test WARNING on linus/master v5.10-rc3 next-20201111] > [cannot apply to arm64/for-next/core tip/x86/core] > [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] > > url: https://github.com/0day-ci/linux/commits/Chen-Zhou/support-reserv= ing-crashkernel-above-4G-on-arm64-kdump/20201031-154154 > base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 6f72f= af4a32303c8bdc6491186b79391e9cf0c7e > config: i386-randconfig-r024-20201110 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 > reproduce (this is a W=3D1 build): > # https://github.com/0day-ci/linux/commit/0384057e2a51e71f42a0e1c= b9d37555f4f37874e > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Chen-Zhou/support-reserving-cras= hkernel-above-4G-on-arm64-kdump/20201031-154154 > git checkout 0384057e2a51e71f42a0e1cb9d37555f4f37874e > # save the attached .config to linux build tree > make W=3D1 ARCH=3Di386 = > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > In file included from arch/x86/kernel/setup.c:39: >>> arch/x86/include/asm/kexec.h:77: warning: "vmcore_elf_check_arch_cross"= redefined > 77 | # define vmcore_elf_check_arch_cross(x) ((x)->e_machine =3D=3D= EM_X86_64) > | = > In file included from arch/x86/kernel/setup.c:9: > include/linux/crash_dump.h:39: note: this is the location of the previ= ous definition > 39 | #define vmcore_elf_check_arch_cross(x) 0 > | = The root cause is that some code under CONFIG_CRASH_CORE depend on CONFIG_K= EXEC_CORE. Patch series "kexec/fadump: remove dependency with CONFIG_KEXEC and reuse c= rashkernel parameter for fadump" removes dependency with CONFIG_KEXEC for crashkernel = parameter and vmcoreinfo related code. This patch series introduce CONFIG_CRASH_CORE and move code related to vmco= reinfo and parsing of crashkernel parameter under this config, allowing code reuse wit= hout dependency on CONFIG_KEXEC. But some functions and macros(in file asm/kexec.h) related with vmcoreinfo = may also have this dependency on CONFIG_KEXEC/CONFIG_KEXEC_CORE. For example, for x86_32, the macro vmcore_elf_check_arch_cross, if CONFIG_K= EXEC_CORE is disabled, vmcore_elf_check_arch_cross will always return 0. I think this= is wrong. # git grep -w vmcore_elf_check_arch_cross arch/x86/include/asm/kexec.h:# define vmcore_elf_check_arch_cross(x) ((x)->= e_machine =3D=3D EM_X86_64) include/linux/crash_dump.h:#ifndef vmcore_elf_check_arch_cross include/linux/crash_dump.h:#define vmcore_elf_check_arch_cross(x) 0 include/linux/crash_dump.h:#define vmcore_elf64_check_arch(x) (elf_check_ar= ch(x) || vmcore_elf_check_arch_cross(x)) I want to move these dependency functions and macros from asm/kexec.h to as= m/crash_dump.h(new file), is my understanding right or any suggestions about this? Thanks, Chen Zhou > vim +/vmcore_elf_check_arch_cross +77 arch/x86/include/asm/kexec.h > > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 7= 5 = > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 7= 6 /* We can also handle crash dumps from 64 bit kernel. */ > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 @7= 7 # define vmcore_elf_check_arch_cross(x) ((x)->e_machine =3D=3D EM_X86_64) > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 7= 8 #else > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 7= 9 /* Maximum physical address we can use pages from */ > 577af55d802d9f arch/x86/include/asm/kexec.h Yinghai Lu 2013-01-24 8= 0 # define KEXEC_SOURCE_MEMORY_LIMIT (MAXMEM-1) > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 8= 1 /* Maximum address we can reach in physical address mode */ > 577af55d802d9f arch/x86/include/asm/kexec.h Yinghai Lu 2013-01-24 8= 2 # define KEXEC_DESTINATION_MEMORY_LIMIT (MAXMEM-1) > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 8= 3 /* Maximum address we can use for the control pages */ > 577af55d802d9f arch/x86/include/asm/kexec.h Yinghai Lu 2013-01-24 8= 4 # define KEXEC_CONTROL_MEMORY_LIMIT (MAXMEM-1) > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 8= 5 = > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3262097127229305126==--