From: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
To: kexec@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
AKASHI Takahiro <takahiro.akashi@linaro.org>,
Eric Biederman <ebiederm@xmission.com>,
Dave Young <dyoung@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
Baoquan He <bhe@redhat.com>,
David Laight <David.Laight@ACULAB.COM>,
Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Stewart Smith <stewart@linux.vnet.ibm.com>,
Arnd Bergmann <arnd@arndb.de>,
Mark Rutland <mark.rutland@arm.com>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH v2 1/2] kexec: add dtb info to struct kimage
Date: Thu, 11 Aug 2016 20:03:57 -0300 [thread overview]
Message-ID: <1470956638-3589-2-git-send-email-bauerman@linux.vnet.ibm.com> (raw)
In-Reply-To: <1470956638-3589-1-git-send-email-bauerman@linux.vnet.ibm.com>
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Device tree blob must be passed to a second kernel on DTB-capable
archs, like powerpc and arm64, but the current kernel interface
lacks this support.
This patch adds dtb buffer information to struct kimage.
When users don't specify dtb explicitly and the one used for the current
kernel can be re-used, this change will be good enough for implementing
kexec_file_load feature.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
include/linux/kexec.h | 3 +++
kernel/kexec_file.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index d7437777baaa..4f85d284ed0b 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -192,6 +192,9 @@ struct kimage {
char *cmdline_buf;
unsigned long cmdline_buf_len;
+ void *dtb_buf;
+ unsigned long dtb_buf_len;
+
/* File operations provided by image loader */
struct kexec_file_ops *fops;
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 503bc2d348e5..113af2f219b9 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -92,6 +92,9 @@ void kimage_file_post_load_cleanup(struct kimage *image)
vfree(image->initrd_buf);
image->initrd_buf = NULL;
+ vfree(image->dtb_buf);
+ image->dtb_buf = NULL;
+
kfree(image->cmdline_buf);
image->cmdline_buf = NULL;
--
1.9.1
next prev parent reply other threads:[~2016-08-11 23:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 23:03 [PATCH v2 0/2] extend kexec_file_load system call Thiago Jung Bauermann
2016-08-11 23:03 ` Thiago Jung Bauermann [this message]
2016-08-18 8:23 ` [PATCH v2 1/2] kexec: add dtb info to struct kimage Dave Young
2016-08-11 23:03 ` [PATCH v2 2/2] kexec: extend kexec_file_load system call Thiago Jung Bauermann
2016-08-12 8:17 ` Balbir Singh
2016-08-12 21:44 ` Thiago Jung Bauermann
2016-08-16 0:13 ` Thiago Jung Bauermann
2016-08-18 8:19 ` Dave Young
2016-08-30 23:34 ` Thiago Jung Bauermann
2016-08-18 10:21 ` [PATCH v2 0/2] " Mark Rutland
2016-08-30 23:25 ` Thiago Jung Bauermann
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=1470956638-3589-2-git-send-email-bauerman@linux.vnet.ibm.com \
--to=bauerman@linux.vnet.ibm.com \
--cc=David.Laight@ACULAB.COM \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=bhe@redhat.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.com \
--cc=mpe@ellerman.id.au \
--cc=stewart@linux.vnet.ibm.com \
--cc=takahiro.akashi@linaro.org \
--cc=vgoyal@redhat.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 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).