Skip to content

Commit

Permalink
ARM: entry: no need to reload the SPSR value from struct pt_regs
Browse files Browse the repository at this point in the history
The SVC IRQ, prefetch and data abort handlers preserve the SPSR value
via r5 across the exception.  Rather than re-loading it from pt_regs,
use the preserved value instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jul 2, 2011
1 parent 40f0b90 commit 30891c9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ __dabt_svc:
@
disable_irq_notrace

@
@ restore SPSR and restart the instruction
@
ldr r5, [sp, #S_PSR]
#ifdef CONFIG_TRACE_IRQFLAGS
tst r5, #PSR_I_BIT
bleq trace_hardirqs_on
Expand All @@ -223,7 +219,7 @@ __irq_svc:
tst r0, #_TIF_NEED_RESCHED
blne svc_preempt
#endif
ldr r5, [sp, #S_PSR]

#ifdef CONFIG_TRACE_IRQFLAGS
@ 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.
Expand Down Expand Up @@ -308,10 +304,6 @@ __pabt_svc:
@
disable_irq_notrace

@
@ restore SPSR and restart the instruction
@
ldr r5, [sp, #S_PSR]
#ifdef CONFIG_TRACE_IRQFLAGS
tst r5, #PSR_I_BIT
bleq trace_hardirqs_on
Expand Down

0 comments on commit 30891c9

Please sign in to comment.