Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63495
b: refs/heads/master
c: 1065932
h: refs/heads/master
i:
  63493: 1f6bf5f
  63491: 2cfaab5
  63487: 8031156
v: v3
  • Loading branch information
Ralf Baechle committed Jul 31, 2007
1 parent 9b72bd0 commit 735e918
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff32b062ea6d16a1c53d57da0ac9419c9d015534
refs/heads/master: 1065932fcb73ca188a497d8853a1a00422ce6c62
13 changes: 8 additions & 5 deletions trunk/arch/mips/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <asm/page.h>

extern const unsigned char relocate_new_kernel[];
extern const unsigned int relocate_new_kernel_size;
extern const size_t relocate_new_kernel_size;

extern unsigned long kexec_start_address;
extern unsigned long kexec_indirection_page;
Expand All @@ -40,6 +40,8 @@ machine_crash_shutdown(struct pt_regs *regs)
{
}

typedef void (*noretfun_t)(void) __attribute__((noreturn));

void
machine_kexec(struct kimage *image)
{
Expand All @@ -51,7 +53,8 @@ machine_kexec(struct kimage *image)
(unsigned long)page_address(image->control_code_page);

kexec_start_address = image->start;
kexec_indirection_page = phys_to_virt(image->head & PAGE_MASK);
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);

memcpy((void*)reboot_code_buffer, relocate_new_kernel,
relocate_new_kernel_size);
Expand All @@ -67,7 +70,7 @@ machine_kexec(struct kimage *image)
phys_to_virt(entry & PAGE_MASK) : ptr + 1) {
if (*ptr & IND_SOURCE || *ptr & IND_INDIRECTION ||
*ptr & IND_DESTINATION)
*ptr = phys_to_virt(*ptr);
*ptr = (unsigned long) phys_to_virt(*ptr);
}

/*
Expand All @@ -78,8 +81,8 @@ machine_kexec(struct kimage *image)
flush_icache_range(reboot_code_buffer,
reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE);

printk("Will call new kernel at %08x\n", image->start);
printk("Will call new kernel at %08lx\n", image->start);
printk("Bye ...\n");
flush_cache_all();
((void (*)(void))reboot_code_buffer)();
((noretfun_t) reboot_code_buffer)();
}

0 comments on commit 735e918

Please sign in to comment.