From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1018043763555708233==" MIME-Version: 1.0 From: Mike Rapoport 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 11:39:25 +0200 Message-ID: <20201112093925.GM4758@kernel.org> In-Reply-To: List-Id: --===============1018043763555708233== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Nov 12, 2020 at 04:17:01PM +0800, chenzhou wrote: > 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-rese= rving-crashkernel-above-4G-on-arm64-kdump/20201031-154154 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 6f7= 2faf4a32303c8bdc6491186b79391e9cf0c7e > > 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/0384057e2a51e71f42a0e= 1cb9d37555f4f37874e > > git remote add linux-review https://github.com/0day-ci/linux > > git fetch --no-tags linux-review Chen-Zhou/support-reserving-cr= ashkernel-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_cros= s" 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 pre= vious definition > > 39 | #define vmcore_elf_check_arch_cross(x) 0 > > | = > The root cause is that some code under CONFIG_CRASH_CORE depend on CONFIG= _KEXEC_CORE. > = > Patch series "kexec/fadump: remove dependency with CONFIG_KEXEC and reuse= crashkernel > parameter for fadump" removes dependency with CONFIG_KEXEC for crashkerne= l parameter > and vmcoreinfo related code. > This patch series introduce CONFIG_CRASH_CORE and move code related to vm= coreinfo and > parsing of crashkernel parameter under this config, allowing code reuse w= ithout dependency > on CONFIG_KEXEC. > = > But some functions and macros(in file asm/kexec.h) related with vmcoreinf= o 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= _KEXEC_CORE > is disabled, vmcore_elf_check_arch_cross will always return 0. I think th= is 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_= arch(x) || vmcore_elf_check_arch_cross(x)) > = > I want to move these dependency functions and macros from asm/kexec.h to = asm/crash_dump.h(new file), > is my understanding right or any suggestions about this? I'd simply move vmcore_elf_check_arch_cross() from arch/x86/include/asm/kexec.h to arch/x86/include/elf.h. The latter is already included in linux/crash_dump.h. > 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 = 75 = > > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 = 76 /* We can also handle crash dumps from 64 bit kernel. */ > > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 = @77 # 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 = 78 #else > > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 = 79 /* Maximum physical address we can use pages from */ > > 577af55d802d9f arch/x86/include/asm/kexec.h Yinghai Lu 2013-01-24 = 80 # define KEXEC_SOURCE_MEMORY_LIMIT (MAXMEM-1) > > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 = 81 /* Maximum address we can reach in physical address mode */ > > 577af55d802d9f arch/x86/include/asm/kexec.h Yinghai Lu 2013-01-24 = 82 # define KEXEC_DESTINATION_MEMORY_LIMIT (MAXMEM-1) > > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 = 83 /* Maximum address we can use for the control pages */ > > 577af55d802d9f arch/x86/include/asm/kexec.h Yinghai Lu 2013-01-24 = 84 # define KEXEC_CONTROL_MEMORY_LIMIT (MAXMEM-1) > > 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 = 85 = > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org > = -- = Sincerely yours, Mike. --===============1018043763555708233==--