summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-05-09 17:10:06 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-08-13 11:58:48 +0200
commitc4b37847d3f8f98335253bd0e7aeee3ba141b237 (patch)
treeee780311384e45c811abacbb73b4eee49bfa31cc /arch
parent45bde489e31a75c87a7b3e00d868b2bdf7d22674 (diff)
MIPS: bootm: optimize kernel entry call
Fix signature of kernel entry function. Mark the kernel entry with __noreturn for better code optimisation. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/lib/bootm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index e7aa11a2c99..692f7dc6ca2 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -69,20 +69,17 @@ static void boot_prep_linux(bootm_headers_t *images)
static void boot_jump_linux(bootm_headers_t *images)
{
- void (*theKernel) (int, char **, char **, int *);
+ typedef void __noreturn (*kernel_entry_t)(int, ulong, ulong, ulong);
+ kernel_entry_t kernel = (kernel_entry_t) images->ep;
- /* find kernel entry point */
- theKernel = (void (*)(int, char **, char **, int *))images->ep;
-
- debug("## Transferring control to Linux (at address %08lx) ...\n",
- (ulong) theKernel);
+ debug("## Transferring control to Linux (at address %p) ...\n", kernel);
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
/* we assume that the kernel is in place */
printf("\nStarting kernel ...\n\n");
- theKernel(linux_argc, linux_argv, linux_env, 0);
+ kernel(linux_argc, (ulong)linux_argv, (ulong)linux_env, 0);
}
int do_bootm_linux(int flag, int argc, char * const argv[],