Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133343
b: refs/heads/master
c: 7be5c55
h: refs/heads/master
i:
  133341: e62e295
  133339: b6b673e
  133335: 935e0d1
  133327: e26e954
  133311: 128e0f6
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Mar 18, 2009
1 parent d6c6a75 commit 22dcde8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 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: c20351846efcb755ba849d9fb701fbd9a1ffb7c2
refs/heads/master: 7be5c55af0cc58e54e42e1702d837527e15b8414
17 changes: 8 additions & 9 deletions trunk/arch/sh/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
typedef NORET_TYPE void (*relocate_new_kernel_t)(
unsigned long indirection_page,
unsigned long reboot_code_buffer,
unsigned long start_address,
unsigned long vbr_reg) ATTRIB_NORET;
unsigned long start_address) ATTRIB_NORET;

extern const unsigned char relocate_new_kernel[];
extern const unsigned int relocate_new_kernel_size;
Expand Down Expand Up @@ -76,14 +75,8 @@ void machine_kexec(struct kimage *image)

unsigned long page_list;
unsigned long reboot_code_buffer;
unsigned long vbr_reg;
relocate_new_kernel_t rnk;

#if defined(CONFIG_SH_STANDARD_BIOS)
vbr_reg = ((unsigned long )gdb_vbr_vector) - 0x100;
#else
vbr_reg = 0x80000000; // dummy
#endif
/* Interrupts aren't acceptable while we reboot */
local_irq_disable();

Expand All @@ -100,9 +93,15 @@ void machine_kexec(struct kimage *image)
kexec_info(image);
flush_cache_all();

set_bl_bit();
#if defined(CONFIG_SH_STANDARD_BIOS)
asm volatile("ldc %0, vbr" :
: "r" (((unsigned long) gdb_vbr_vector) - 0x100)
: "memory");
#endif
/* now call it */
rnk = (relocate_new_kernel_t) reboot_code_buffer;
(*rnk)(page_list, reboot_code_buffer, P2SEGADDR(image->start), vbr_reg);
(*rnk)(page_list, reboot_code_buffer, P2SEGADDR(image->start));
}

void arch_crash_save_vmcoreinfo(void)
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/sh/kernel/relocate_kernel.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ relocate_new_kernel:
/* r4 = indirection_page */
/* r5 = reboot_code_buffer */
/* r6 = start_address */
/* r7 = vbr_reg */

mov.l 10f,r8 /* PAGE_SIZE */
mov.l 11f,r9 /* P2SEG */
Expand Down Expand Up @@ -80,9 +79,6 @@ relocate_new_kernel:
bra 0b
nop
6:
#ifdef CONFIG_SH_STANDARD_BIOS
ldc r7, vbr
#endif
jmp @r6
nop

Expand Down

0 comments on commit 22dcde8

Please sign in to comment.