linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] add machine-specific hook to machine_kexec
@ 2011-02-02 22:16 Eric Cooper
  2011-02-02 22:16 ` [PATCH v2 2/3] Kirkwood: enable PCIe before reading device ID register Eric Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Cooper @ 2011-02-02 22:16 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-04 13:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 22:16 [PATCH v2 1/3] add machine-specific hook to machine_kexec Eric Cooper
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

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).