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-reserving-cras...
> base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
6f72faf4a32303c8bdc6491186b79391e9cf0c7e
> config: i386-randconfig-r024-20201110 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce (this is a W=1 build):
> #
https://github.com/0day-ci/linux/commit/0384057e2a51e71f42a0e1cb9d37555f4...
> git remote add linux-review
https://github.com/0day-ci/linux
> git fetch --no-tags linux-review
Chen-Zhou/support-reserving-crashkernel-above-4G-on-arm64-kdump/20201031-154154
> git checkout 0384057e2a51e71f42a0e1cb9d37555f4f37874e
> # save the attached .config to linux build tree
> make W=1 ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp(a)intel.com>
>
> 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 == 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 previous
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 crashkernel
parameter
and vmcoreinfo related code.
This patch series introduce CONFIG_CRASH_CORE and move code related to vmcoreinfo and
parsing of crashkernel parameter under this config, allowing code reuse without
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_KEXEC_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
== 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 == 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@lists.01.org
--
Sincerely yours,
Mike.