diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 95103c1..c03f7dc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -322,7 +322,6 @@ config ARM_UNWIND bool "enable stack unwinding support" depends on AEABI - depends on ARM_EXCEPTIONS help This option enables stack unwinding support in barebox using the information automatically generated by the diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c index e8191ec..eb12166 100644 --- a/arch/arm/cpu/cpu.c +++ b/arch/arm/cpu/cpu.c @@ -121,29 +121,3 @@ return 0; } coredevice_initcall(arm_request_stack); - -#ifdef CONFIG_THUMB2_BAREBOX -static void thumb2_execute(void *func, int argc, char *argv[]) -{ - /* - * Switch back to ARM mode before executing external - * programs. - */ - __asm__ __volatile__ ( - "mov r0, #0\n" - "mov r1, %0\n" - "mov r2, %1\n" - "bx %2\n" - : - : "r" (argc - 1), "r" (&argv[1]), "r" (func) - : "r0", "r1", "r2" - ); -} - -static int execute_init(void) -{ - do_execute = thumb2_execute; - return 0; -} -postcore_initcall(execute_init); -#endif diff --git a/arch/arm/cpu/interrupts.c b/arch/arm/cpu/interrupts.c index c437af7..fb4bb78 100644 --- a/arch/arm/cpu/interrupts.c +++ b/arch/arm/cpu/interrupts.c @@ -71,13 +71,6 @@ #endif } -#ifdef CONFIG_ARM_UNWIND -void dump_stack(void) -{ - unwind_backtrace(NULL); -} -#endif - static void __noreturn do_exception(struct pt_regs *pt_regs) { show_regs(pt_regs); diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index 16879f8..47b9bd3 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -277,17 +277,5 @@ __asm__ __volatile__("mcr p15, 0, %0, c1, c0" :: "r" (reg)); } -#ifdef CONFIG_THUMB2_BAREBOX - __asm__ __volatile__ ( - "mov r0, #0\n" - "mov r1, %0\n" - "mov r2, %1\n" - "bx %2\n" - : - : "r" (architecture), "r" (params), "r" (kernel) - : "r0", "r1", "r2" - ); -#else kernel(0, architecture, params); -#endif } diff --git a/arch/arm/lib/unwind.c b/arch/arm/lib/unwind.c index 7932bca..c3dca5b 100644 --- a/arch/arm/lib/unwind.c +++ b/arch/arm/lib/unwind.c @@ -331,6 +331,11 @@ } } +void dump_stack(void) +{ + unwind_backtrace(NULL); +} + static int unwind_init(void) { struct unwind_idx *idx; diff --git a/commands/go.c b/commands/go.c index f25db48..fb319b3 100644 --- a/commands/go.c +++ b/commands/go.c @@ -60,10 +60,7 @@ shutdown_barebox(); - if (do_execute) - do_execute(func, argc - 1, &argv[1]); - else - func(argc - 1, &argv[1]); + func(argc - 1, &argv[1]); /* * The application returned. Since we have shutdown barebox and diff --git a/common/misc.c b/common/misc.c index 5532349..8b2417b 100644 --- a/common/misc.c +++ b/common/misc.c @@ -130,9 +130,6 @@ } EXPORT_SYMBOL(perror); -void (*do_execute)(void *func, int argc, char *argv[]); -EXPORT_SYMBOL(do_execute); - static char *model; /* diff --git a/include/common.h b/include/common.h index 03ceec2..38a6dbf 100644 --- a/include/common.h +++ b/include/common.h @@ -113,12 +113,6 @@ void __noreturn start_barebox(void); void shutdown_barebox(void); -/* - * architectures which have special calling conventions for - * executing programs should set this. Used by the 'go' command - */ -extern void (*do_execute)(void *func, int argc, char *argv[]); - int run_shell(void); #ifdef CONFIG_SHELL_HUSH