aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-header.S
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-03-28 10:36:05 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-04-03 11:50:23 -0400
commitf8f02ec25ce3eafb049feeb3abf34fcd6e338241 (patch)
treeebaebfd89c34d48081f2de60932f5ee418f1358a /arch/arm/kernel/entry-header.S
parent9b56febea22003c424f11248908b534eba0f1eeb (diff)
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: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-header.S')
-rw-r--r--arch/arm/kernel/entry-header.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index 0bf15e5c40a2..57a1631f065a 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -76,12 +76,15 @@
76#ifndef CONFIG_THUMB2_KERNEL 76#ifndef CONFIG_THUMB2_KERNEL
77 .macro svc_exit, rpsr, irq = 0 77 .macro svc_exit, rpsr, irq = 0
78 .if \irq != 0 78 .if \irq != 0
79 @ IRQs already off
79#ifdef CONFIG_TRACE_IRQFLAGS 80#ifdef CONFIG_TRACE_IRQFLAGS
80 @ The parent context IRQs must have been enabled to get here in 81 @ The parent context IRQs must have been enabled to get here in
81 @ the first place, so there's no point checking the PSR I bit. 82 @ the first place, so there's no point checking the PSR I bit.
82 bl trace_hardirqs_on 83 bl trace_hardirqs_on
83#endif 84#endif
84 .else 85 .else
86 @ IRQs off again before pulling preserved data off the stack
87 disable_irq_notrace
85#ifdef CONFIG_TRACE_IRQFLAGS 88#ifdef CONFIG_TRACE_IRQFLAGS
86 tst \rpsr, #PSR_I_BIT 89 tst \rpsr, #PSR_I_BIT
87 bleq trace_hardirqs_on 90 bleq trace_hardirqs_on
@@ -136,12 +139,15 @@
136#else /* CONFIG_THUMB2_KERNEL */ 139#else /* CONFIG_THUMB2_KERNEL */
137 .macro svc_exit, rpsr, irq = 0 140 .macro svc_exit, rpsr, irq = 0
138 .if \irq != 0 141 .if \irq != 0
142 @ IRQs already off
139#ifdef CONFIG_TRACE_IRQFLAGS 143#ifdef CONFIG_TRACE_IRQFLAGS
140 @ The parent context IRQs must have been enabled to get here in 144 @ The parent context IRQs must have been enabled to get here in
141 @ the first place, so there's no point checking the PSR I bit. 145 @ the first place, so there's no point checking the PSR I bit.
142 bl trace_hardirqs_on 146 bl trace_hardirqs_on
143#endif 147#endif
144 .else 148 .else
149 @ IRQs off again before pulling preserved data off the stack
150 disable_irq_notrace
145#ifdef CONFIG_TRACE_IRQFLAGS 151#ifdef CONFIG_TRACE_IRQFLAGS
146 tst \rpsr, #PSR_I_BIT 152 tst \rpsr, #PSR_I_BIT
147 bleq trace_hardirqs_on 153 bleq trace_hardirqs_on