summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@kymetacorp.com>2015-12-04 19:24:19 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2015-12-07 10:44:45 +0100
commita2b3a25417593e97500cd746f0632d36edfac1a5 (patch)
treed7fdf1cb8319d51f8b3b0f259d56621a211e2282 /arch/arm/cpu
parentde7a09bb4326fd9f014303a45e3ad5a729ac3a3c (diff)
downloadbarebox-a2b3a25417593e97500cd746f0632d36edfac1a5.tar.gz
barebox-a2b3a25417593e97500cd746f0632d36edfac1a5.tar.xz
ARM: Remove do_execute and thumb2_execute
In commit 104a6a7ccfb7928ca5dc28c8cbe0ea231ffc45ee support was added for Thumb2. It added do_execute() as a way to provide arch dependent calling veneers for use in "go" and thumb2_execute() as the thumb2 to arm veneer. But thumb2_execute() isn't necessary as gcc generates a proper calling sequence from a standard function pointer call. Thumb2 barebox is compiled with the AAPCS ABI which requires this. It also had a bug and didn't pass the arguments properly, but code execute via "go" rarely uses arguments so this wasn't very noticeable. Since thumb2 was always the only user of do_execute(), go ahead and delete that too. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/cpu.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c
index e8191ecde5..eb12166c16 100644
--- a/arch/arm/cpu/cpu.c
+++ b/arch/arm/cpu/cpu.c
@@ -121,29 +121,3 @@ static int arm_request_stack(void)
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