提交 f8f02ec2 编写于 作者: R Russell King

ARM: entry: move disable_irq_notrace into svc_exit

All svc exit paths need IRQs off.  Rather than placing this before
every user of svc_exit, combine it into this macro.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 9b56febe
...@@ -192,11 +192,6 @@ __dabt_svc: ...@@ -192,11 +192,6 @@ __dabt_svc:
svc_entry svc_entry
mov r2, sp mov r2, sp
dabt_helper dabt_helper
@
@ IRQs off again before pulling preserved data off the stack
@
disable_irq_notrace
svc_exit r5 @ return from exception svc_exit r5 @ return from exception
UNWIND(.fnend ) UNWIND(.fnend )
ENDPROC(__dabt_svc) ENDPROC(__dabt_svc)
...@@ -283,15 +278,7 @@ __und_svc_fault: ...@@ -283,15 +278,7 @@ __und_svc_fault:
mov r0, sp @ struct pt_regs *regs mov r0, sp @ struct pt_regs *regs
bl __und_fault bl __und_fault
@
@ IRQs off again before pulling preserved data off the stack
@
__und_svc_finish: __und_svc_finish:
disable_irq_notrace
@
@ restore SPSR and restart the instruction
@
ldr r5, [sp, #S_PSR] @ Get SVC cpsr ldr r5, [sp, #S_PSR] @ Get SVC cpsr
svc_exit r5 @ return from exception svc_exit r5 @ return from exception
UNWIND(.fnend ) UNWIND(.fnend )
...@@ -302,11 +289,6 @@ __pabt_svc: ...@@ -302,11 +289,6 @@ __pabt_svc:
svc_entry svc_entry
mov r2, sp @ regs mov r2, sp @ regs
pabt_helper pabt_helper
@
@ IRQs off again before pulling preserved data off the stack
@
disable_irq_notrace
svc_exit r5 @ return from exception svc_exit r5 @ return from exception
UNWIND(.fnend ) UNWIND(.fnend )
ENDPROC(__pabt_svc) ENDPROC(__pabt_svc)
......
...@@ -76,12 +76,15 @@ ...@@ -76,12 +76,15 @@
#ifndef CONFIG_THUMB2_KERNEL #ifndef CONFIG_THUMB2_KERNEL
.macro svc_exit, rpsr, irq = 0 .macro svc_exit, rpsr, irq = 0
.if \irq != 0 .if \irq != 0
@ IRQs already off
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
@ The parent context IRQs must have been enabled to get here in @ The parent context IRQs must have been enabled to get here in
@ the first place, so there's no point checking the PSR I bit. @ the first place, so there's no point checking the PSR I bit.
bl trace_hardirqs_on bl trace_hardirqs_on
#endif #endif
.else .else
@ IRQs off again before pulling preserved data off the stack
disable_irq_notrace
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
tst \rpsr, #PSR_I_BIT tst \rpsr, #PSR_I_BIT
bleq trace_hardirqs_on bleq trace_hardirqs_on
...@@ -136,12 +139,15 @@ ...@@ -136,12 +139,15 @@
#else /* CONFIG_THUMB2_KERNEL */ #else /* CONFIG_THUMB2_KERNEL */
.macro svc_exit, rpsr, irq = 0 .macro svc_exit, rpsr, irq = 0
.if \irq != 0 .if \irq != 0
@ IRQs already off
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
@ The parent context IRQs must have been enabled to get here in @ The parent context IRQs must have been enabled to get here in
@ the first place, so there's no point checking the PSR I bit. @ the first place, so there's no point checking the PSR I bit.
bl trace_hardirqs_on bl trace_hardirqs_on
#endif #endif
.else .else
@ IRQs off again before pulling preserved data off the stack
disable_irq_notrace
#ifdef CONFIG_TRACE_IRQFLAGS #ifdef CONFIG_TRACE_IRQFLAGS
tst \rpsr, #PSR_I_BIT tst \rpsr, #PSR_I_BIT
bleq trace_hardirqs_on bleq trace_hardirqs_on
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册