From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Baoquan he <bhe@redhat.com>,
Hari Bathini <hbathini@linux.ibm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/6] powerpc/crash: use generic crashkernel reservation
Date: Tue, 21 Jan 2025 17:24:36 +0530 [thread overview]
Message-ID: <20250121115442.1278458-1-sourabhjain@linux.ibm.com> (raw)
Commit 0ab97169aa05 ("crash_core: add generic function to do
reservation") added a generic function to reserve crashkernel memory.
So let's use the same function on powerpc and remove the
architecture-specific code that essentially does the same thing.
The generic crashkernel reservation also provides a way to split the
crashkernel reservation into high and low memory reservations, which can
be enabled for powerpc in the future.
Additionally move powerpc to use generic APIs to locate memory hole for
kexec segments while loading kdump kernel.
Patch series summary:
=====================
Patch 1-3: generic changes
Patch 4-5: powerpc changes
Patch 6: generic + powerpc changes
Changelog:
v1 Resend:
- Rebased on top of 6.13-rc6
v2:
- 01/06 new patch, fixes a bug with ELF load address
It was posted in community as individual path but
since it align with this patch series so include here:
https://lore.kernel.org/all/20241210091314.185785-1-sourabhjain@linux.ibm.com/
- Fixed a typo 06/06
- Added Acked-by and Reviewed-by tags
- Rebased it on 6.13
- It was suggested to try HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY and
see if 03/06 patch can be avoided:
https://lore.kernel.org/all/Z35gnO2N%2FLFt1E7E@MiWiFi-R3L-srv/
But after adding HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY the issue
persisted and kernel prints below logs on boot:
[ 0.646339] ------------[ cut here ]------------
[ 0.646351] WARNING: CPU: 0 PID: 1 at arch/powerpc/mm/mem.c:379
add_system_ram_resources+0xf0/0x15c
[ 0.646369] Modules linked in:
[ 0.646376] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted
6.13.0-rc6+ #1
[ 0.646386] Hardware name: IBM,9105-22A POWER10 (architected)
0x800200 0xf000006 of:IBM,FW1060.00 (NL1060_027) hv:phyp pSeries
[ 0.646397] NIP: c000000002016b3c LR: c000000002016b34 CTR:
0000000000000000
[ 0.646406] REGS: c000000004817920 TRAP: 0700 Not tainted
(6.13.0-rc6+)
e8/0x15c (unreliable)
[ 0.646603] [c000000004817c20] [c000000000010a4c]
do_one_initcall+0x7c/0x39c
[ 0.646618] [c000000004817d00] [c000000002005418]
do_initcalls+0x144/0x18c
0x290
[ 0.646648] [c000000004817df0] [c0000000000110f4]
kernel_init+0x2c/0x1b8
+0x14/0x1c
[ 0.646676] --- interrupt: 0 at 0x0
010020
[ 0.646720] ---[ end trace 0000000000000000 ]---
So 03/06 is not removed from patch series.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Baoquan he <bhe@redhat.com>
Cc: Hari Bathini <hbathini@linux.ibm.com>
CC: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: kexec@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: sourabhjain@linux.ibm.com
Sourabh Jain (6):
kexec: Initialize ELF lowest address to ULONG_MAX
crash: remove an unused argument from reserve_crashkernel_generic()
crash: let arch decide crash memory export to iomem_resource
powerpc/kdump: preserve user-specified memory limit
powerpc/crash: use generic crashkernel reservation
crash: option to let arch decide mem range is usable
arch/arm64/mm/init.c | 6 +-
arch/loongarch/kernel/setup.c | 5 +-
arch/powerpc/Kconfig | 3 +
arch/powerpc/include/asm/crash_reserve.h | 18 ++
arch/powerpc/include/asm/kexec.h | 10 +-
arch/powerpc/kernel/prom.c | 2 +-
arch/powerpc/kexec/core.c | 96 ++++-----
arch/powerpc/kexec/file_load_64.c | 259 +----------------------
arch/riscv/mm/init.c | 6 +-
arch/x86/kernel/setup.c | 6 +-
include/linux/crash_reserve.h | 22 +-
include/linux/kexec.h | 9 +
kernel/crash_reserve.c | 12 +-
kernel/kexec_elf.c | 2 +-
kernel/kexec_file.c | 12 ++
15 files changed, 128 insertions(+), 340 deletions(-)
create mode 100644 arch/powerpc/include/asm/crash_reserve.h
--
2.47.1
next reply other threads:[~2025-01-21 11:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 11:54 Sourabh Jain [this message]
2025-01-21 11:54 ` [PATCH v2 1/6] kexec: Initialize ELF lowest address to ULONG_MAX Sourabh Jain
2025-01-23 10:04 ` Hari Bathini
2025-01-23 11:23 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 2/6] crash: remove an unused argument from reserve_crashkernel_generic() Sourabh Jain
2025-01-23 10:13 ` Hari Bathini
2025-01-21 11:54 ` [PATCH v2 3/6] crash: let arch decide crash memory export to iomem_resource Sourabh Jain
2025-01-23 10:26 ` Hari Bathini
2025-01-23 11:50 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 4/6] powerpc/kdump: preserve user-specified memory limit Sourabh Jain
2025-01-23 10:30 ` Hari Bathini
2025-01-23 11:22 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 5/6] powerpc/crash: use generic crashkernel reservation Sourabh Jain
2025-01-23 10:45 ` Hari Bathini
2025-01-23 11:53 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 6/6] crash: option to let arch decide mem range is usable Sourabh Jain
2025-01-24 9:52 ` Hari Bathini
2025-01-24 10:28 ` Sourabh Jain
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=20250121115442.1278458-1-sourabhjain@linux.ibm.com \
--to=sourabhjain@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=hbathini@linux.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
/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®