FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

LinkBack Thread Tools
Old 01-22-2009, 07:33 AM
Amit Kucheria
Default Fix kexec on ARM by properly calling the relocation function

Forwarding a patch to fix kexec on ARM. Comments sought.

---------- Forwarded message ----------
From: Michael Casadevall <sonicmctails@gmail.com>
Date: Tue, Jan 20, 2009 at 4:43 PM
Subject: [PATCH] UBUNTU: [arm] Fix kexec on ARM by properly calling
the relocation function
To: kernel-team@lists.ubuntu.com
Cc: Michael Casadevall <michael.casadevall@canonical.com>

From: Michael Casadevall <michael.casadevall@canonical.com>

The kexec syscall function is broken on ARM due to it not properly calling
the relocation stub with the correct arguments. This patch puts machine_kexec
in line with the other architectures, and allows kexec to work peroply on ARM.
It has been tested on the versatile kernel successfully.

Signed-off-by: Michael Casadevall <michael.casadevall@canonical.com>
arch/arm/kernel/machine_kexec.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index 440dc62..d16f6f4 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -23,6 +23,11 @@ extern unsigned long kexec_indirection_page;
extern unsigned long kexec_mach_type;
extern unsigned long kexec_boot_atags;

+typedef NORET_TYPE void (*relocate_new_kernel_t)(
+ unsigned long indirection_page,
+ unsigned long reboot_code_buffer,
+ unsigned long start_address) ATTRIB_NORET;
* Provide a dummy crash_notes definition while crash dump arrives to arm.
* This prevents breakage of crash_notes attribute in kernel/ksysfs.c.
@@ -50,7 +55,7 @@ void machine_kexec(struct kimage *image)
unsigned long page_list;
unsigned long reboot_code_buffer_phys;
void *reboot_code_buffer;
+ relocate_new_kernel_t rnk;

page_list = image->head & PAGE_MASK;

@@ -76,5 +81,7 @@ void machine_kexec(struct kimage *image)

setup_mm_for_reboot(0); /* mode is not used, so just pass 0*/
- cpu_reset(reboot_code_buffer_phys);
+ rnk = (relocate_new_kernel_t) reboot_code_buffer;
+ (*rnk)(page_list, reboot_code_buffer_phys, image->start);

kernel-team mailing list

Thread Tools

All times are GMT. The time now is 05:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org