linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-kernel@vger.kernel.org,
	Dave Vasilevsky <dave@vasilevsky.ca>,
	Michael Ellerman <mpe@ellerman.id.au>,
	kexec@lists.infradead.org, debian-powerpc@lists.debian.org,
	x86@kernel.org, linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org,
	linux-sh@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-riscv@lists.infradead.org, loongarch@lists.linux.dev,
	akpm@linux-foundation.org, ebiederm@xmission.com,
	hbathini@linux.ibm.com, piliu@redhat.com,
	viro@zeniv.linux.org.uk, Sam James <sam@gentoo.org>
Subject: Re: [PATCH linux-next v3 05/14] crash: clean up kdump related config items
Date: Thu, 22 Aug 2024 17:17:36 +0800	[thread overview]
Message-ID: <ZscCMLfNbj2MDiaB@MiWiFi-R3L-srv> (raw)
In-Reply-To: <a9d9ecd1ed8d62eae47ec26257093495e6cbd44a.camel@physik.fu-berlin.de>

On 08/22/24 at 09:33am, John Paul Adrian Glaubitz wrote:
> Hi Baoquan,
> 
> On Wed, 2024-01-24 at 13:12 +0800, Baoquan He wrote:
> > By splitting CRASH_RESERVE and VMCORE_INFO out from CRASH_CORE, cleaning
> > up the dependency of FA_DMUMP on CRASH_DUMP, and moving crash codes from
> > kexec_core.c to crash_core.c, now we can rearrange CRASH_DUMP to
> > depend on KEXEC_CORE, and make CRASH_DUMP select CRASH_RESERVE and
> > VMCORE_INFO.
> > 
> > KEXEC_CORE won't select CRASH_RESERVE and VMCORE_INFO any more because
> > KEXEC_CORE enables codes which allocate control pages, copy
> > kexec/kdump segments, and prepare for switching. These codes are shared
> > by both kexec reboot and crash dumping.
> > 
> > Doing this makes codes and the corresponding config items more
> > logical (the right item depends on or is selected by the left item).
> > 
> > PROC_KCORE -----------> VMCORE_INFO
> > 
> >            |----------> VMCORE_INFO
> > FA_DUMP----|
> >            |----------> CRASH_RESERVE
> > 
> >                                                 ---->VMCORE_INFO
> >                                                /
> >                                                |---->CRASH_RESERVE
> > KEXEC      --|                                /|
> >              |--> KEXEC_CORE--> CRASH_DUMP-->/-|---->PROC_VMCORE
> > KEXEC_FILE --|                               \ |
> >                                                \---->CRASH_HOTPLUG
> > 
> > KEXEC      --|
> >              |--> KEXEC_CORE--> kexec reboot
> > KEXEC_FILE --|
> > 
> > Signed-off-by: Baoquan He <bhe@redhat.com>
> > ---
> >  kernel/Kconfig.kexec | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec
> > index 8faf27043432..6c34e63c88ff 100644
> > --- a/kernel/Kconfig.kexec
> > +++ b/kernel/Kconfig.kexec
> > @@ -9,8 +9,6 @@ config VMCORE_INFO
> >  	bool
> >  
> >  config KEXEC_CORE
> > -	select VMCORE_INFO
> > -	select CRASH_RESERVE
> >  	bool
> >  
> >  config KEXEC_ELF
> > @@ -99,8 +97,11 @@ config KEXEC_JUMP
> >  
> >  config CRASH_DUMP
> >  	bool "kernel crash dumps"
> > +	default y
> >  	depends on ARCH_SUPPORTS_CRASH_DUMP
> > -	select KEXEC_CORE
> > +	depends on KEXEC_CORE
> > +	select VMCORE_INFO
> > +	select CRASH_RESERVE
> >  	help
> >  	  Generate crash dump after being started by kexec.
> >  	  This should be normally only set in special crash dump kernels
> 
> The change to enable CONFIG_CRASH_DUMP by default apparently broke the boot
> on 32-bit Power Macintosh systems which fail after GRUB with:
> 
> 	"Error: You can't boot a kdump kernel from OF!"
> 
> We may have to turn this off for 32-bit Power Macintosh systems.
> 
> See this thread on debian-powerpc ML: https://lists.debian.org/debian-powerpc/2024/07/msg00001.html

If so, fix need be made.

We may need change in ARCH_SUPPORTS_CRASH_DUMP of ppc, can you or anyone
post a patch? I don't know how to identify 32-bit Power Macintosh.

arch/powerpc/Kconfig:
===
config ARCH_SUPPORTS_CRASH_DUMP
        def_bool PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
        
config ARCH_SELECTS_CRASH_DUMP
        def_bool y
        depends on CRASH_DUMP
        select RELOCATABLE if PPC64 || 44x || PPC_85xx
......
config PHYSICAL_START
        hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
        default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
        default "0x00000000"


  reply	other threads:[~2024-08-22  9:17 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24  5:12 [PATCH linux-next v3 00/14] Split crash out from kexec and clean up related config items Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 01/14] kexec: split crashkernel reservation code out from crash_core.c Baoquan He
2024-01-28  1:28   ` Klara Modin
2024-01-29  1:57     ` Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 02/14] crash: split vmcoreinfo exporting " Baoquan He
2024-03-25  8:24   ` Geert Uytterhoeven
2024-03-25  9:48     ` Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 03/14] crash: remove dependency of FA_DUMP on CRASH_DUMP Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 04/14] crash: split crash dumping code out from kexec_core.c Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 05/14] crash: clean up kdump related config items Baoquan He
2024-08-22  7:33   ` John Paul Adrian Glaubitz
2024-08-22  9:17     ` Baoquan He [this message]
2024-08-22  9:37       ` John Paul Adrian Glaubitz
2024-08-23  0:04         ` Baoquan He
2024-08-23  0:41           ` Dave Vasilevsky
2024-08-23  1:58             ` Baoquan He
2024-08-23  7:16             ` John Paul Adrian Glaubitz
2024-08-23 11:58               ` Dave Vasilevsky
2024-08-23 12:05                 ` Dave Vasilevsky
2024-01-24  5:12 ` [PATCH linux-next v3 06/14] x86, crash: wrap crash dumping code into crash related ifdefs Baoquan He
2024-01-24 23:02   ` Michael Kelley
2024-01-25  4:09     ` Baoquan He
2024-01-25  5:12       ` Michael Kelley
2024-01-25  9:17         ` Baoquan He
2024-01-25 15:30           ` Michael Kelley
2024-01-24  5:12 ` [PATCH linux-next v3 07/14] arm64, " Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 08/14] ppc, crash: enforce KEXEC and KEXEC_FILE to select CRASH_DUMP Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 09/14] s390, crash: wrap crash dumping code into crash related ifdefs Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 10/14] sh, " Baoquan He
2024-01-24  8:13   ` John Paul Adrian Glaubitz
2024-01-24 14:38     ` Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 11/14] mips, " Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 12/14] riscv, " Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 13/14] arm, " Baoquan He
2024-01-24  5:12 ` [PATCH linux-next v3 14/14] loongarch, " Baoquan He
2024-01-26  4:55 ` [PATCH linux-next v3 00/14] Split crash out from kexec and clean up related config items Nathan Chancellor
2024-01-26  6:07   ` Baoquan He

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=ZscCMLfNbj2MDiaB@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave@vasilevsky.ca \
    --cc=debian-powerpc@lists.debian.org \
    --cc=ebiederm@xmission.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=hbathini@linux.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=mpe@ellerman.id.au \
    --cc=piliu@redhat.com \
    --cc=sam@gentoo.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.org \
    /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).