From: ecc@cmu.edu (Eric Cooper)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] add machine-specific hook to machine_kexec
Date: Wed, 2 Feb 2011 17:16:09 -0500 [thread overview]
Message-ID: <1296684971-10577-1-git-send-email-ecc@cmu.edu> (raw)
Provide the option to call a machine-specific function
before kexec'ing a new kernel.
Signed-off-by: Eric Cooper <ecc@cmu.edu>
---
arch/arm/kernel/machine_kexec.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index 30ead13..e59bbd4 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -75,6 +75,11 @@ void machine_crash_shutdown(struct pt_regs *regs)
printk(KERN_INFO "Loading crashdump kernel...\n");
}
+/*
+ * Function pointer to optional machine-specific reinitialization
+ */
+void (*kexec_reinit)(void);
+
void machine_kexec(struct kimage *image)
{
unsigned long page_list;
@@ -104,6 +109,8 @@ void machine_kexec(struct kimage *image)
(unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
printk(KERN_INFO "Bye!\n");
+ if (kexec_reinit)
+ kexec_reinit();
local_irq_disable();
local_fiq_disable();
setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/
--
1.7.2.3
next reply other threads:[~2011-02-02 22:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 22:16 Eric Cooper [this message]
2011-02-02 22:16 ` [PATCH v2 2/3] Kirkwood: enable PCIe before reading device ID register Eric Cooper
2011-02-04 13:16 ` Sergei Shtylyov
2011-02-02 22:16 ` [PATCH v2 3/3] Kirkwood: enable PCIe for kexec Eric Cooper
2011-02-02 22:22 ` [PATCH v2 1/3] add machine-specific hook to machine_kexec Nicolas Pitre
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=1296684971-10577-1-git-send-email-ecc@cmu.edu \
--to=ecc@cmu.edu \
--cc=linux-arm-kernel@lists.infradead.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.