diff options
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r-- | arch/arm/include/asm/assembler.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 9a4965ad6867..b974184f9941 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
24 | #include <asm/domain.h> | 24 | #include <asm/domain.h> |
25 | #include <asm/opcodes-virt.h> | 25 | #include <asm/opcodes-virt.h> |
26 | #include <asm/asm-offsets.h> | ||
26 | 27 | ||
27 | #define IOMEM(x) (x) | 28 | #define IOMEM(x) (x) |
28 | 29 | ||
@@ -184,6 +185,37 @@ | |||
184 | mov \rd, \rd, lsl #13 | 185 | mov \rd, \rd, lsl #13 |
185 | .endm | 186 | .endm |
186 | 187 | ||
188 | /* | ||
189 | * Increment/decrement the preempt count. | ||
190 | */ | ||
191 | #ifdef CONFIG_PREEMPT_COUNT | ||
192 | .macro inc_preempt_count, ti, tmp | ||
193 | ldr \tmp, [\ti, #TI_PREEMPT] @ get preempt count | ||
194 | add \tmp, \tmp, #1 @ increment it | ||
195 | str \tmp, [\ti, #TI_PREEMPT] | ||
196 | .endm | ||
197 | |||
198 | .macro dec_preempt_count, ti, tmp | ||
199 | ldr \tmp, [\ti, #TI_PREEMPT] @ get preempt count | ||
200 | sub \tmp, \tmp, #1 @ decrement it | ||
201 | str \tmp, [\ti, #TI_PREEMPT] | ||
202 | .endm | ||
203 | |||
204 | .macro dec_preempt_count_ti, ti, tmp | ||
205 | get_thread_info \ti | ||
206 | dec_preempt_count \ti, \tmp | ||
207 | .endm | ||
208 | #else | ||
209 | .macro inc_preempt_count, ti, tmp | ||
210 | .endm | ||
211 | |||
212 | .macro dec_preempt_count, ti, tmp | ||
213 | .endm | ||
214 | |||
215 | .macro dec_preempt_count_ti, ti, tmp | ||
216 | .endm | ||
217 | #endif | ||
218 | |||
187 | #define USER(x...) \ | 219 | #define USER(x...) \ |
188 | 9999: x; \ | 220 | 9999: x; \ |
189 | .pushsection __ex_table,"a"; \ | 221 | .pushsection __ex_table,"a"; \ |