[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ac04399-9c17-b036-5b14-92eadb65522b@oracle.com>
Date: Wed, 5 Jul 2023 10:22:52 -0500
From: Eric DeVolder <eric.devolder@...cle.com>
To: Arnd Bergmann <arnd@...db.de>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
"James E . J . Bottomley" <James.Bottomley@...senPartnership.com>,
Helge Deller <deller@....de>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-ia64@...r.kernel.org, loongarch@...ts.linux.dev,
linux-m68k@...ts.linux-m68k.org, linux-mips@...r.kernel.org,
linux-parisc@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org
Cc: WANG Xuerui <kernel@...0n.name>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Heiko Carstens <hca@...ux.ibm.com>, gor@...ux.ibm.com,
Alexander Gordeev <agordeev@...ux.ibm.com>,
borntraeger@...ux.ibm.com, Sven Schnelle <svens@...ux.ibm.com>,
"H. Peter Anvin" <hpa@...or.com>,
Kees Cook <keescook@...omium.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <frederic@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ard Biesheuvel <ardb@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
Juerg Haefliger <juerg.haefliger@...onical.com>,
Russell King <rmk+kernel@...linux.org.uk>,
Linus Walleij <linus.walleij@...aro.org>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
Mike Rapoport <rppt@...nel.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Anshuman Khandual <anshuman.khandual@....com>,
Zi Yan <ziy@...dia.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Zhen Lei <thunder.leizhen@...wei.com>,
Xin Li <xin3.li@...el.com>, Tejun Heo <tj@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
tsi@...oix.net, Baoquan He <bhe@...hat.com>,
hbathini@...ux.ibm.com, sourabhjain@...ux.ibm.com,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec
On 7/5/23 10:05, Arnd Bergmann wrote:
> On Wed, Jul 5, 2023, at 16:19, Eric DeVolder wrote:
>> The kexec and crash kernel options are provided in the common
>> kernel/Kconfig.kexec. Utilize the common options and provide
>> the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the
>> equivalent set of KEXEC and CRASH options.
>>
>> Signed-off-by: Eric DeVolder <eric.devolder@...cle.com>
>
>> +config ARCH_SUPPORTS_KEXEC
>> + def_bool (!SMP || PM_SLEEP_SMP) && MMU
>>
>> config ATAGS_PROC
>> bool "Export atags in procfs"
>> @@ -1668,17 +1656,8 @@ config ATAGS_PROC
>> Should the atags used to boot the kernel be exported in an "atags"
>> file in procfs. Useful with kexec.
>>
>> -config CRASH_DUMP
>> - bool "Build kdump crash kernel (EXPERIMENTAL)"
>> - help
>> - Generate crash dump after being started by kexec. This should
>> - be normally only set in special crash dump kernels which are
>> - loaded in the main kernel with kexec-tools into a specially
>> - reserved region and then later executed after a crash by
>> - kdump/kexec. The crash dump kernel must be compiled to a
>> - memory address not used by the main kernel
>> -
>> - For more details see Documentation/admin-guide/kdump/kdump.rst
>> +config ARCH_SUPPORTS_CRASH_DUMP
>> + def_bool y
>>
>
> I see this is now in linux-next, and it caused a few randconfig
> build issues, these never happened in the past:
Arnd,
Thanks for looking at this!
I received randconfig errors from Andrew Morton's machinery. When investigating I
found that randconfig was able to specify CRASH_DUMP without KEXEC, and that lead
to problems. I believe this situation existed prior to this series as well.
Specifically CRASH_DUMP does not have a dependency on KEXEC, or select (only s390
has this hole closed).
For CRASH_DUMP, this series now selects KEXEC to close this gap, which is what a
sane config would have (ie both CRASH_DUMP and KEXEC).
Do you think the changes outlined below are still needed?
eric
>
> * The #ifdef CONFIG_KEXEC check in arch/arm/include/asm/kexec.h
> needs to be changed to CONFIG_KEXEC_CORE:
>
> include/linux/kexec.h:41:2: error: #error KEXEC_SOURCE_MEMORY_LIMIT not defined
>
> same thing on m68k
>
> * ARCH_SUPPORTS_CRASH_DUMP needs the same dependency as ARCH_SUPPORTS_KEXEC,
> otherwise we seem to run into an obscure assembler error building the kdump
> core on architectures that do not support kdump:
>
> /tmp/ccpYl6w9.s:1546: Error: selected processor does not support requested special purpose register -- `mrs r2,cpsr'
>
> * Most architectures build machine_kexec.o only when KEXEC is enabled,
> this also needs to be changed to KEXEC_CORE:
>
> --- a/arch/arm/kernel/Makefile
> +++ b/arch/arm/kernel/Makefile
> @@ -59,7 +59,7 @@ obj-$(CONFIG_FUNCTION_TRACER) += entry-ftrace.o
> obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o patch.o
> obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o patch.o
> obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o
> -obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
> +obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o relocate_kernel.o
> # Main staffs in KPROBES are in arch/arm/probes/ .
> obj-$(CONFIG_KPROBES) += patch.o insn.o
> obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
>
>
> Arnd
Powered by blists - more mailing lists