From: Baoquan he <bhe@redhat.com>
To: Sourabh Jain <sourabhjain@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Andrew Morton <akpm@linux-foundation.org>,
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: Re: [PATCH RESEND v1 2/5] crash: let arch decide crash memory export to iomem_resource
Date: Wed, 8 Jan 2025 19:25:16 +0800 [thread overview]
Message-ID: <Z35gnO2N/LFt1E7E@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20250108101458.406806-3-sourabhjain@linux.ibm.com>
Hi,
On 01/08/25 at 03:44pm, Sourabh Jain wrote:
> insert_crashkernel_resources() adds crash memory to iomem_resource if
> generic crashkernel reservation is enabled on an architecture.
>
> On PowerPC, system RAM is added to iomem_resource. See commit
> c40dd2f766440 ("powerpc: Add System RAM to /proc/iomem").
>
> Enabling generic crashkernel reservation on PowerPC leads to a conflict
> when system RAM is added to iomem_resource because a part of the system
> RAM, the crashkernel memory, has already been added to iomem_resource.
>
> The next commit in the series "powerpc/crash: use generic crashkernel
> reservation" enables generic crashkernel reservation on PowerPC. If the
> crashkernel is added to iomem_resource, the kernel fails to add
> system RAM to /proc/iomem and prints the following traces:
>
> CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.13.0-rc2+
> snip...
> NIP [c000000002016b3c] add_system_ram_resources+0xf0/0x15c
> LR [c000000002016b34] add_system_ram_resources+0xe8/0x15c
> Call Trace:
> [c00000000484bbc0] [c000000002016b34] add_system_ram_resources+0xe8/0x15c
> [c00000000484bc20] [c000000000010a4c] do_one_initcall+0x7c/0x39c
> [c00000000484bd00] [c000000002005418] do_initcalls+0x144/0x18c
> [c00000000484bd90] [c000000002005714] kernel_init_freeable+0x21c/0x290
> [c00000000484bdf0] [c0000000000110f4] kernel_init+0x2c/0x1b8
> [c00000000484be50] [c00000000000dd3c] ret_from_kernel_user_thread+0x14/0x1c
>
> To avoid this, an architecture hook is added in
> insert_crashkernel_resources(), allowing the architecture to decide
> whether crashkernel memory should be added to iomem_resource.
Have you tried defining HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY in ppc to
add crashkernel region to iomem early? Now there are two branches in the
existing code, adding a hook will make three ways.
next prev parent reply other threads:[~2025-01-08 11:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 10:14 [PATCH RESEND v1 0/5] powerpc/crash: use generic crashkernel reservation Sourabh Jain
2025-01-08 10:14 ` [PATCH RESEND v1 1/5] crash: remove an unused argument from reserve_crashkernel_generic() Sourabh Jain
2025-01-08 11:16 ` Baoquan he
2025-01-09 3:48 ` Sourabh Jain
2025-01-08 10:14 ` [PATCH RESEND v1 2/5] crash: let arch decide crash memory export to iomem_resource Sourabh Jain
2025-01-08 11:25 ` Baoquan he [this message]
2025-01-08 12:02 ` Sourabh Jain
2025-01-08 10:14 ` [PATCH RESEND v1 3/5] powerpc/kdump: preserve user-specified memory limit Sourabh Jain
2025-01-08 17:06 ` Mahesh J Salgaonkar
2025-01-09 3:24 ` Sourabh Jain
2025-01-08 10:14 ` [PATCH RESEND v1 4/5] powerpc/crash: use generic crashkernel reservation Sourabh Jain
2025-01-08 17:05 ` Mahesh J Salgaonkar
2025-01-09 3:43 ` Sourabh Jain
2025-01-08 10:14 ` [PATCH RESEND v1 5/5] crash: option to let arch decide mem range is usable Sourabh Jain
2025-01-08 11:38 ` Baoquan he
2025-01-08 12:03 ` 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=Z35gnO2N/LFt1E7E@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--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 \
--cc=sourabhjain@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.