aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/assembler.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 19:50:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 19:50:35 -0500
commit3c0cb7c31c206aaedb967e44b98442bbeb17a6c4 (patch)
tree3ecba45d7ffae4fba4a5aafaef4af5b0b1105bde /arch/arm/include/asm/assembler.h
parentf70f5b9dc74ca7d0a64c4ead3fb28da09dc1b234 (diff)
parent404a02cbd2ae8bf256a2fa1169bdfe86bb5ebb34 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (416 commits) ARM: DMA: add support for DMA debugging ARM: PL011: add DMA burst threshold support for ST variants ARM: PL011: Add support for transmit DMA ARM: PL011: Ensure IRQs are disabled in UART interrupt handler ARM: PL011: Separate hardware FIFO size from TTY FIFO size ARM: PL011: Allow better handling of vendor data ARM: PL011: Ensure error flags are clear at startup ARM: PL011: include revision number in boot-time port printk ARM: vexpress: add sched_clock() for Versatile Express ARM i.MX53: Make MX53 EVK bootable ARM i.MX53: Some bug fix about MX53 MSL code ARM: 6607/1: sa1100: Update platform device registration ARM: 6606/1: sa1100: Fix platform device registration ARM i.MX51: rename IPU irqs ARM i.MX51: Add ipu clock support ARM: imx/mx27_3ds: Add PMIC support ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn() mx51: fix usb clock support MX51: Add support for usb host 2 arch/arm/plat-mxc/ehci.c: fix errors/typos ...
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r--arch/arm/include/asm/assembler.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 749bb6622404..bc2d2d75f706 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -18,6 +18,7 @@
18#endif 18#endif
19 19
20#include <asm/ptrace.h> 20#include <asm/ptrace.h>
21#include <asm/domain.h>
21 22
22/* 23/*
23 * Endian independent macros for shifting bytes within registers. 24 * Endian independent macros for shifting bytes within registers.
@@ -157,16 +158,24 @@
157#ifdef CONFIG_SMP 158#ifdef CONFIG_SMP
158#define ALT_SMP(instr...) \ 159#define ALT_SMP(instr...) \
1599998: instr 1609998: instr
161/*
162 * Note: if you get assembler errors from ALT_UP() when building with
163 * CONFIG_THUMB2_KERNEL, you almost certainly need to use
164 * ALT_SMP( W(instr) ... )
165 */
160#define ALT_UP(instr...) \ 166#define ALT_UP(instr...) \
161 .pushsection ".alt.smp.init", "a" ;\ 167 .pushsection ".alt.smp.init", "a" ;\
162 .long 9998b ;\ 168 .long 9998b ;\
163 instr ;\ 1699997: instr ;\
170 .if . - 9997b != 4 ;\
171 .error "ALT_UP() content must assemble to exactly 4 bytes";\
172 .endif ;\
164 .popsection 173 .popsection
165#define ALT_UP_B(label) \ 174#define ALT_UP_B(label) \
166 .equ up_b_offset, label - 9998b ;\ 175 .equ up_b_offset, label - 9998b ;\
167 .pushsection ".alt.smp.init", "a" ;\ 176 .pushsection ".alt.smp.init", "a" ;\
168 .long 9998b ;\ 177 .long 9998b ;\
169 b . + up_b_offset ;\ 178 W(b) . + up_b_offset ;\
170 .popsection 179 .popsection
171#else 180#else
172#define ALT_SMP(instr...) 181#define ALT_SMP(instr...)
@@ -177,16 +186,24 @@
177/* 186/*
178 * SMP data memory barrier 187 * SMP data memory barrier
179 */ 188 */
180 .macro smp_dmb 189 .macro smp_dmb mode
181#ifdef CONFIG_SMP 190#ifdef CONFIG_SMP
182#if __LINUX_ARM_ARCH__ >= 7 191#if __LINUX_ARM_ARCH__ >= 7
192 .ifeqs "\mode","arm"
183 ALT_SMP(dmb) 193 ALT_SMP(dmb)
194 .else
195 ALT_SMP(W(dmb))
196 .endif
184#elif __LINUX_ARM_ARCH__ == 6 197#elif __LINUX_ARM_ARCH__ == 6
185 ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb 198 ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb
186#else 199#else
187#error Incompatible SMP platform 200#error Incompatible SMP platform
188#endif 201#endif
202 .ifeqs "\mode","arm"
189 ALT_UP(nop) 203 ALT_UP(nop)
204 .else
205 ALT_UP(W(nop))
206 .endif
190#endif 207#endif
191 .endm 208 .endm
192 209
@@ -206,12 +223,12 @@
206 */ 223 */
207#ifdef CONFIG_THUMB2_KERNEL 224#ifdef CONFIG_THUMB2_KERNEL
208 225
209 .macro usraccoff, instr, reg, ptr, inc, off, cond, abort 226 .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=T()
2109999: 2279999:
211 .if \inc == 1 228 .if \inc == 1
212 \instr\cond\()bt \reg, [\ptr, #\off] 229 \instr\cond\()b\()\t\().w \reg, [\ptr, #\off]
213 .elseif \inc == 4 230 .elseif \inc == 4
214 \instr\cond\()t \reg, [\ptr, #\off] 231 \instr\cond\()\t\().w \reg, [\ptr, #\off]
215 .else 232 .else
216 .error "Unsupported inc macro argument" 233 .error "Unsupported inc macro argument"
217 .endif 234 .endif
@@ -246,13 +263,13 @@
246 263
247#else /* !CONFIG_THUMB2_KERNEL */ 264#else /* !CONFIG_THUMB2_KERNEL */
248 265
249 .macro usracc, instr, reg, ptr, inc, cond, rept, abort 266 .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=T()
250 .rept \rept 267 .rept \rept
2519999: 2689999:
252 .if \inc == 1 269 .if \inc == 1
253 \instr\cond\()bt \reg, [\ptr], #\inc 270 \instr\cond\()b\()\t \reg, [\ptr], #\inc
254 .elseif \inc == 4 271 .elseif \inc == 4
255 \instr\cond\()t \reg, [\ptr], #\inc 272 \instr\cond\()\t \reg, [\ptr], #\inc
256 .else 273 .else
257 .error "Unsupported inc macro argument" 274 .error "Unsupported inc macro argument"
258 .endif 275 .endif