From ddc7801b9f8d0a923dea250e742fae58a846d491 Mon Sep 17 00:00:00 2001 From: NicJA Date: Tue, 19 Feb 2013 22:15:40 +0000 Subject: [PATCH] re-enable interrupts after leaving superstate git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46655 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/arm-raspi/exec/userstate.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/arm-raspi/exec/userstate.c b/arch/arm-raspi/exec/userstate.c index 6ca623a7f7..08c8bb0d21 100644 --- a/arch/arm-raspi/exec/userstate.c +++ b/arch/arm-raspi/exec/userstate.c @@ -44,14 +44,16 @@ { AROS_LIBFUNC_INIT - asm volatile ( - " stmfd sp!, {lr} \n" - " mov r1, sp \n" - " mov sp, %[superSP] \n" - " cps %[mode_user] \n" - " mov sp, r1 \n" - " ldmfd sp!, {lr} \n" - : : [superSP] "X" (superSP), [mode_user] "I" (CPUMODE_USER) : "r1" ); - + if (superSP) + { + asm volatile ( + " stmfd sp!, {lr} \n" + " mov r1, sp \n" + " mov sp, %[superSP] \n" + " cpsie i, %[mode_user] \n" + " mov sp, r1 \n" + " ldmfd sp!, {lr} \n" + : : [superSP] "r" (superSP), [mode_user] "I" (CPUMODE_USER) : "r1" ); + } AROS_LIBFUNC_EXIT } /* UserState() */ -- 2.11.4.GIT