linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Eric DeVolder" <eric.devolder@oracle.com>,
	"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: Peter Zijlstra <peterz@infradead.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Zhen Lei <thunder.leizhen@huawei.com>,
	"H. Peter Anvin" <hpa@zytor.com>, WANG Xuerui <kernel@xen0n.name>,
	Ard Biesheuvel <ardb@kernel.org>,
	tsi@tuyoix.net, Alexander Gordeev <agordeev@linux.ibm.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Baoquan He <bhe@redhat.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	Miguel Ojeda <ojeda@kernel.org>,
	Juerg Haefliger <juerg.haefliger@canonical.com>,
	borntraeger@linux.ibm.com,
	Frederic Weisbecker <frederic@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Kees Cook <keescook@chromium.org>,
	gor@linux.ibm.com, Anshuman Khandual <anshuman.khandual@arm.com>,
	Heiko Carstens <hca@linux.ibm.com>, Xin Li <xin3.li@intel.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Russell King <rmk+kernel@armlinu x.org.uk>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Zi Yan <ziy@nvidia.com>,
	hbathini@linux.ibm.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	sourabhjain@linux.ibm.com, Palmer Dabbelt <palmer@dabbelt.com>,
	Sven Schnelle <svens@linux.ibm.com>, Tejun Heo <tj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@kernel.org>
Subject: Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec
Date: Wed, 05 Jul 2023 17:05:53 +0200	[thread overview]
Message-ID: <09f70de6-9409-4fa4-b9ea-831078d914e7@app.fastmail.com> (raw)
In-Reply-To: <20230705142004.3605799-4-eric.devolder@oracle.com>

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:

* 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

  reply	other threads:[~2023-07-05 22:16 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 [this message]
2023-07-05 15:22     ` Eric DeVolder
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=09f70de6-9409-4fa4-b9ea-831078d914e7@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=agordeev@linux.ibm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=ardb@kernel.org \
    --cc=bhe@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=dalias@libc.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=deller@gmx.de \
    --cc=eric.devolder@oracle.com \
    --cc=frederic@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=gor@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=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=npiggin@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rmk+kernel@armlinu \
    --cc=samitolvanen@google.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=tglx@linutronix.de \
    --cc=thunder.leizhen@huawei.com \
    --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 \
    /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;
as well as URLs for NNTP newsgroup(s).