From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-mips@linux-mips.org
Cc: ralf@linux-mips.org, james.hogan@imgtec.com,
paul.burton@imgtec.com, marcin.nowakowski@imgtec.com,
justinpopo6@gmail.com, bcm-kernel-feedback-list@broadcom.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH 1/2] MIPS: kexec: Provide bootloader arguments by default
Date: Tue, 7 Mar 2017 17:46:40 -0800 [thread overview]
Message-ID: <20170308014641.16267-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170308014641.16267-1-f.fainelli@gmail.com>
In case we do not implement a _machine_kexec_shutdown callback to do
platform specific kexec shutdown operations, the most sensible thing to
do is to provide the kexec'd kernel with the same arguments we initially
booted with.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/mips/kernel/machine_kexec.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 8b574bcd39ba..8c5bbf302ab1 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -11,6 +11,7 @@
#include <linux/delay.h>
#include <asm/cacheflush.h>
+#include <asm/bootinfo.h>
#include <asm/page.h>
extern const unsigned char relocate_new_kernel[];
@@ -66,8 +67,14 @@ machine_kexec_cleanup(struct kimage *kimage)
void
machine_shutdown(void)
{
- if (_machine_kexec_shutdown)
+ if (_machine_kexec_shutdown) {
_machine_kexec_shutdown();
+ } else {
+ kexec_args[0] = fw_arg0;
+ kexec_args[1] = fw_arg1;
+ kexec_args[2] = fw_arg2;
+ kexec_args[3] = fw_arg3;
+ }
}
void
--
2.9.3
next prev parent reply other threads:[~2017-03-08 1:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 1:46 [PATCH 0/2] MIPS: Couple kexec related fixes Florian Fainelli
2017-03-08 1:46 ` Florian Fainelli [this message]
2017-03-10 12:16 ` [PATCH 1/2] MIPS: kexec: Provide bootloader arguments by default Ralf Baechle
2017-03-08 1:46 ` [PATCH 2/2] MIPS: c-r4k: Do not SMP function call during kexec Florian Fainelli
2017-03-10 10:31 ` Ralf Baechle
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=20170308014641.16267-2-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=james.hogan@imgtec.com \
--cc=justinpopo6@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=marcin.nowakowski@imgtec.com \
--cc=paul.burton@imgtec.com \
--cc=ralf@linux-mips.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 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.