@@ -421,7 +421,7 @@ ENDPROC(__fiq_abt)
.align 5
__dabt_usr:
usr_entry uaccess=0
- asm_irqentry_enter_from_user_mode save = 0
+ asm_irqentry_enter_from_user_mode
kuser_cmpxchg_check
mov r2, sp
dabt_helper
@@ -432,7 +432,7 @@ ENDPROC(__dabt_usr)
.align 5
__irq_usr:
usr_entry
- asm_irqentry_enter_from_user_mode save = 0
+ asm_irqentry_enter_from_user_mode
kuser_cmpxchg_check
irq_handler from_user=1
get_thread_info tsk
@@ -446,7 +446,7 @@ ENDPROC(__irq_usr)
.align 5
__und_usr:
usr_entry uaccess=0
- asm_irqentry_enter_from_user_mode save = 0
+ asm_irqentry_enter_from_user_mode
@ IRQs must be enabled before attempting to read the instruction from
@ user space since that could cause a page/translation fault if the
@@ -471,7 +471,7 @@ ENDPROC(__und_usr)
.align 5
__pabt_usr:
usr_entry
- asm_irqentry_enter_from_user_mode save = 0
+ asm_irqentry_enter_from_user_mode
mov r2, sp @ regs
pabt_helper
UNWIND(.fnend )
@@ -109,7 +109,7 @@ ENTRY(ret_to_user_from_irq)
movs r1, r1, lsl #16
bne slow_work_pending
no_work_pending:
- asm_irqentry_exit_to_user_mode save = 0
+ asm_irqentry_exit_to_user_mode
#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
bl stackleak_erase_on_task_stack
@@ -365,28 +365,14 @@ ALT_UP_B(.L1_\@)
* Context tracking and other mode transitions. Used to instrument transitions
* between user and kernel mode.
*/
- .macro asm_irqentry_enter_from_user_mode, save = 1
- .if \save
- stmdb sp!, {r0-r3, ip, lr}
+ .macro asm_irqentry_enter_from_user_mode
mov r0, sp @ regs
bl irqentry_enter_from_user_mode
- ldmia sp!, {r0-r3, ip, lr}
- .else
- mov r0, sp @ regs
- bl irqentry_enter_from_user_mode
- .endif
.endm
- .macro asm_irqentry_exit_to_user_mode, save = 1
- .if \save
- stmdb sp!, {r0-r3, ip, lr}
+ .macro asm_irqentry_exit_to_user_mode
mov r0, sp @ regs
bl irqentry_exit_to_user_mode
- ldmia sp!, {r0-r3, ip, lr}
- .else
- mov r0, sp @ regs
- bl irqentry_exit_to_user_mode
- .endif
.endm
/*
asm_irqentry_enter_from_user_mode and asm_irqentry_exit_to_user_mode have a "save" argument that will save and restore registers before the call to the C function. Now all invocations set this argument to 0 so drop the surplus code. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- arch/arm/kernel/entry-armv.S | 8 ++++---- arch/arm/kernel/entry-common.S | 2 +- arch/arm/kernel/entry-header.S | 18 ++---------------- 3 files changed, 7 insertions(+), 21 deletions(-)