From: Eric DeVolder <eric.devolder@oracle.com>
To: Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
Helge Deller <deller@gmx.de>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org,
linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
linux-s390@vger.kernel.org, linux-sh@vger.kernel.org
Cc: WANG Xuerui <kernel@xen0n.name>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Heiko Carstens <hca@linux.ibm.com>,
gor@linux.ibm.com, Alexander Gordeev <agordeev@linux.ibm.com>,
borntraeger@linux.ibm.com, Sven Schnelle <svens@linux.ibm.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Kees Cook <keescook@chromium.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <frederic@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ard Biesheuvel <ardb@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Juerg Haefliger <juerg.haefliger@canonical.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Mike Rapoport <rppt@kernel.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Zi Yan <ziy@nvidia.com>, Masahiro Yamada <masahiroy@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Miguel Ojeda <ojeda@kernel.org>,
Zhen Lei <thunder.leizhen@huawei.com>, Xin Li <xin3.li@intel.com>,
Tejun Heo <tj@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
tsi@tuyoix.net, Baoquan He <bhe@redhat.com>,
hbathini@linux.ibm.com, sourabhjain@linux.ibm.com,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec
Date: Wed, 5 Jul 2023 10:22:52 -0500 [thread overview]
Message-ID: <6ac04399-9c17-b036-5b14-92eadb65522b@oracle.com> (raw)
In-Reply-To: <09f70de6-9409-4fa4-b9ea-831078d914e7@app.fastmail.com>
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@oracle.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
next prev parent reply other threads:[~2023-07-05 15:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 14:19 [PATCH v4 00/13] refactor Kconfig to consolidate KEXEC and CRASH options Eric DeVolder
2023-07-05 14:19 ` [PATCH v4 01/13] kexec: consolidate kexec and crash options into kernel/Kconfig.kexec Eric DeVolder
2023-07-06 12:18 ` Arnd Bergmann
2023-07-06 12:23 ` Eric DeVolder
2023-07-05 14:19 ` [PATCH v4 02/13] x86/kexec: refactor for kernel/Kconfig.kexec Eric DeVolder
2023-07-05 14:19 ` [PATCH v4 03/13] arm/kexec: " Eric DeVolder
2023-07-05 15:05 ` Arnd Bergmann
2023-07-05 15:22 ` Eric DeVolder [this message]
2023-07-05 15:53 ` Arnd Bergmann
2023-07-05 14:19 ` [PATCH v4 04/13] ia64/kexec: " Eric DeVolder
2023-07-05 14:19 ` [PATCH v4 05/13] arm64/kexec: " Eric DeVolder
2023-07-05 14:19 ` [PATCH v4 06/13] loongarch/kexec: " Eric DeVolder
2023-07-05 14:19 ` [PATCH v4 07/13] m68k/kexec: " Eric DeVolder
2023-07-05 14:19 ` [PATCH v4 08/13] mips/kexec: " Eric DeVolder
2023-07-05 14:20 ` [PATCH v4 09/13] parisc/kexec: " Eric DeVolder
2023-07-05 14:20 ` [PATCH v4 10/13] powerpc/kexec: " Eric DeVolder
2023-07-05 14:20 ` [PATCH v4 11/13] riscv/kexec: " Eric DeVolder
2023-07-05 14:20 ` [PATCH v4 12/13] s390/kexec: " Eric DeVolder
2023-07-05 15:49 ` Nathan Chancellor
2023-07-05 16:23 ` Eric DeVolder
2023-07-05 19:44 ` Eric DeVolder
2023-07-06 15:58 ` Alexander Gordeev
2023-07-06 16:07 ` Eric DeVolder
2023-07-05 14:20 ` [PATCH v4 13/13] sh/kexec: " Eric DeVolder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ac04399-9c17-b036-5b14-92eadb65522b@oracle.com \
--to=eric.devolder@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=aou@eecs.berkeley.edu \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bhe@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dalias@libc.org \
--cc=dave.hansen@linux.intel.com \
--cc=deller@gmx.de \
--cc=frederic@kernel.org \
--cc=geert@linux-m68k.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=gor@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=hbathini@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=juerg.haefliger@canonical.com \
--cc=keescook@chromium.org \
--cc=kernel@xen0n.name \
--cc=kirill.shutemov@linux.intel.com \
--cc=konrad.wilk@oracle.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=ndesaulniers@google.com \
--cc=npiggin@gmail.com \
--cc=ojeda@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=rppt@kernel.org \
--cc=samitolvanen@google.com \
--cc=sebastian.reichel@collabora.com \
--cc=sourabhjain@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=thunder.leizhen@huawei.com \
--cc=tj@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=tsi@tuyoix.net \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=xin3.li@intel.com \
--cc=ysato@users.sourceforge.jp \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®