Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Eric DeVolder" <eric.devolder@xxxxxxxxxx>, "Russell King" <linux@xxxxxxxxxxxxxxx>, "Catalin Marinas" <catalin.marinas@xxxxxxx>, "Will Deacon" <will@xxxxxxxxxx>, "Huacai Chen" <chenhuacai@xxxxxxxxxx>, "Geert Uytterhoeven" <geert@xxxxxxxxxxxxxx>, "Thomas Bogendoerfer" <tsbogend@xxxxxxxxxxxxxxxx>, "James E . J . Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "Helge Deller" <deller@xxxxxx>, "Yoshinori Sato" <ysato@xxxxxxxxxxxxx>, "Rich Felker" <dalias@xxxxxxxx>, "John Paul Adrian Glaubitz" <glaubitz@xxxxxxxxxxxxxxxxxxx>, "Thomas Gleixner" <tglx@xxxxxxxxxxxxx>, "Ingo Molnar" <mingo@xxxxxxxxxx>, "Borislav Petkov" <bp@xxxxxxxxx>, "Dave Hansen" <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx
- Subject: Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec
- From: "Arnd Bergmann" <arnd@xxxxxxxx>
- Date: Wed, 05 Jul 2023 17:05:53 +0200
- Cc: "WANG Xuerui" <kernel@xxxxxxxxxx>, "Michael Ellerman" <mpe@xxxxxxxxxxxxxx>, "Nicholas Piggin" <npiggin@xxxxxxxxx>, "Christophe Leroy" <christophe.leroy@xxxxxxxxxx>, "Paul Walmsley" <paul.walmsley@xxxxxxxxxx>, "Palmer Dabbelt" <palmer@xxxxxxxxxxx>, "Albert Ou" <aou@xxxxxxxxxxxxxxxxx>, "Heiko Carstens" <hca@xxxxxxxxxxxxx>, gor@xxxxxxxxxxxxx, "Alexander Gordeev" <agordeev@xxxxxxxxxxxxx>, borntraeger@xxxxxxxxxxxxx, "Sven Schnelle" <svens@xxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, "Kees Cook" <keescook@xxxxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, "Peter Zijlstra" <peterz@xxxxxxxxxxxxx>, "Frederic Weisbecker" <frederic@xxxxxxxxxx>, "Andrew Morton" <akpm@xxxxxxxxxxxxxxxxxxxx>, "Ard Biesheuvel" <ardb@xxxxxxxxxx>, "Sami Tolvanen" <samitolvanen@xxxxxxxxxx>, "Juerg Haefliger" <juerg.haefliger@xxxxxxxxxxxxx>, "Russell King" <rmk+kernel@xxxxxxxxxxxxxxx>, "Linus Walleij" <linus.walleij@xxxxxxxxxx>, "Sebastian Reichel" <sebastian.reichel@xxxxxxxxxxxxx>, "Mike Rapoport" <rppt@xxxxxxxxxx>, "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>, "Anshuman Khandual" <anshuman.khandual@xxxxxxx>, "Zi Yan" <ziy@xxxxxxxxxx>, "Masahiro Yamada" <masahiroy@xxxxxxxxxx>, "Nick Desaulniers" <ndesaulniers@xxxxxxxxxx>, "Masami Hiramatsu" <mhiramat@xxxxxxxxxx>, "Miguel Ojeda" <ojeda@xxxxxxxxxx>, "Zhen Lei" <thunder.leizhen@xxxxxxxxxx>, "Xin Li" <xin3.li@xxxxxxxxx>, "Tejun Heo" <tj@xxxxxxxxxx>, "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>, tsi@xxxxxxxxxx, "Baoquan He" <bhe@xxxxxxxxxx>, hbathini@xxxxxxxxxxxxx, sourabhjain@xxxxxxxxxxxxx, "Boris Ostrovsky" <boris.ostrovsky@xxxxxxxxxx>, "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>
- Feedback-id: i56a14606:Fastmail
- In-reply-to: <20230705142004.3605799-4-eric.devolder@oracle.com>
- References: <20230705142004.3605799-1-eric.devolder@oracle.com> <20230705142004.3605799-4-eric.devolder@oracle.com>
- User-agent: Cyrus-JMAP/3.9.0-alpha0-531-gfdfa13a06d-fm-20230703.001-gfdfa13a0
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@xxxxxxxxxx>
> +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:
* 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
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]