linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: linuxppc-dev@ozlabs.org, mpe@ellerman.id.au
Cc: eric.devolder@oracle.com, bhe@redhat.com,
	mahesh@linux.vnet.ibm.com, kexec@lists.infradead.org,
	ldufour@linux.ibm.com, hbathini@linux.ibm.com
Subject: [PATCH v5 2/5] powerpc/crash hp: update kimage_arch struct
Date: Mon, 20 Jun 2022 12:31:03 +0530	[thread overview]
Message-ID: <20220620070106.93141-3-sourabhjain@linux.ibm.com> (raw)
In-Reply-To: <20220620070106.93141-1-sourabhjain@linux.ibm.com>

Once the kimage is prepared the only way to identify which kexec segment
holds FDT is by looping through all kexec segments. To avoid this a new
member "fdt_index" is added to kimage_arch struct. The new member holds
the index of FDT segment in the kexec segment array which gives direct
access to FDT segment.

The fdt_index will be populated during kexec load for both kexec_load
and kexec_file_load case.

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
 arch/powerpc/include/asm/kexec.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h
index c8040c93b15a..9489e5ca93fb 100644
--- a/arch/powerpc/include/asm/kexec.h
+++ b/arch/powerpc/include/asm/kexec.h
@@ -106,6 +106,9 @@ extern const struct kexec_file_ops kexec_elf64_ops;
 struct kimage_arch {
 	struct crash_mem *exclude_ranges;
 
+#if defined(CONFIG_HOTPLUG_CPU)
+	int fdt_index;
+#endif
 	unsigned long backup_start;
 	void *backup_buf;
 	void *fdt;
-- 
2.36.1


  parent reply	other threads:[~2022-06-20  7:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20  7:01 [PATCH v5 0/5] In kernel handling of CPU hotplug events for crash kernel Sourabh Jain
2022-06-20  7:01 ` [PATCH v5 1/5] powerpc/kexec: make update_cpus_node non-static Sourabh Jain
2022-06-21  8:59   ` Laurent Dufour
2022-06-22  8:40     ` Sourabh Jain
2022-06-20  7:01 ` Sourabh Jain [this message]
2022-06-20  7:01 ` [PATCH v5 3/5] powerpc/crash hp: add crash hotplug support for kexec_file_load Sourabh Jain
2022-06-22 15:11   ` Laurent Dufour
2022-06-20  7:01 ` [PATCH v5 4/5] powerpc/crash hp: add crash hotplug support for kexec_load Sourabh Jain
2022-06-22 15:25   ` Laurent Dufour
2022-06-20  7:01 ` [PATCH v5 5/5] powerpc/crash hp: add crash page helper functions Sourabh Jain
2022-06-22 15:33   ` Laurent Dufour

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=20220620070106.93141-3-sourabhjain@linux.ibm.com \
    --to=sourabhjain@linux.ibm.com \
    --cc=bhe@redhat.com \
    --cc=eric.devolder@oracle.com \
    --cc=hbathini@linux.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=ldufour@linux.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.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;
as well as URLs for NNTP newsgroup(s).