git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[pandora-kernel.git]
/
arch
/
arm
/
include
/
asm
/
assembler.h
diff --git
a/arch/arm/include/asm/assembler.h
b/arch/arm/include/asm/assembler.h
index
749bb66
..
bc2d2d7
100644
(file)
--- a/
arch/arm/include/asm/assembler.h
+++ b/
arch/arm/include/asm/assembler.h
@@
-18,6
+18,7
@@
#endif
#include <asm/ptrace.h>
#endif
#include <asm/ptrace.h>
+#include <asm/domain.h>
/*
* Endian independent macros for shifting bytes within registers.
/*
* Endian independent macros for shifting bytes within registers.
@@
-157,16
+158,24
@@
#ifdef CONFIG_SMP
#define ALT_SMP(instr...) \
9998: instr
#ifdef CONFIG_SMP
#define ALT_SMP(instr...) \
9998: instr
+/*
+ * Note: if you get assembler errors from ALT_UP() when building with
+ * CONFIG_THUMB2_KERNEL, you almost certainly need to use
+ * ALT_SMP( W(instr) ... )
+ */
#define ALT_UP(instr...) \
.pushsection ".alt.smp.init", "a" ;\
.long 9998b ;\
#define ALT_UP(instr...) \
.pushsection ".alt.smp.init", "a" ;\
.long 9998b ;\
- instr ;\
+9997: instr ;\
+ .if . - 9997b != 4 ;\
+ .error "ALT_UP() content must assemble to exactly 4 bytes";\
+ .endif ;\
.popsection
#define ALT_UP_B(label) \
.equ up_b_offset, label - 9998b ;\
.pushsection ".alt.smp.init", "a" ;\
.long 9998b ;\
.popsection
#define ALT_UP_B(label) \
.equ up_b_offset, label - 9998b ;\
.pushsection ".alt.smp.init", "a" ;\
.long 9998b ;\
-
b
. + up_b_offset ;\
+
W(b)
. + up_b_offset ;\
.popsection
#else
#define ALT_SMP(instr...)
.popsection
#else
#define ALT_SMP(instr...)
@@
-177,16
+186,24
@@
/*
* SMP data memory barrier
*/
/*
* SMP data memory barrier
*/
- .macro smp_dmb
+ .macro smp_dmb
mode
#ifdef CONFIG_SMP
#if __LINUX_ARM_ARCH__ >= 7
#ifdef CONFIG_SMP
#if __LINUX_ARM_ARCH__ >= 7
+ .ifeqs "\mode","arm"
ALT_SMP(dmb)
ALT_SMP(dmb)
+ .else
+ ALT_SMP(W(dmb))
+ .endif
#elif __LINUX_ARM_ARCH__ == 6
ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb
#else
#error Incompatible SMP platform
#endif
#elif __LINUX_ARM_ARCH__ == 6
ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb
#else
#error Incompatible SMP platform
#endif
+ .ifeqs "\mode","arm"
ALT_UP(nop)
ALT_UP(nop)
+ .else
+ ALT_UP(W(nop))
+ .endif
#endif
.endm
#endif
.endm
@@
-206,12
+223,12
@@
*/
#ifdef CONFIG_THUMB2_KERNEL
*/
#ifdef CONFIG_THUMB2_KERNEL
- .macro usraccoff, instr, reg, ptr, inc, off, cond, abort
+ .macro usraccoff, instr, reg, ptr, inc, off, cond, abort
, t=T()
9999:
.if \inc == 1
9999:
.if \inc == 1
- \instr\cond\()b
t
\reg, [\ptr, #\off]
+ \instr\cond\()b
\()\t\().w
\reg, [\ptr, #\off]
.elseif \inc == 4
.elseif \inc == 4
- \instr\cond\()
t
\reg, [\ptr, #\off]
+ \instr\cond\()
\t\().w
\reg, [\ptr, #\off]
.else
.error "Unsupported inc macro argument"
.endif
.else
.error "Unsupported inc macro argument"
.endif
@@
-246,13
+263,13
@@
#else /* !CONFIG_THUMB2_KERNEL */
#else /* !CONFIG_THUMB2_KERNEL */
- .macro usracc, instr, reg, ptr, inc, cond, rept, abort
+ .macro usracc, instr, reg, ptr, inc, cond, rept, abort
, t=T()
.rept \rept
9999:
.if \inc == 1
.rept \rept
9999:
.if \inc == 1
- \instr\cond\()bt \reg, [\ptr], #\inc
+ \instr\cond\()b
\()\
t \reg, [\ptr], #\inc
.elseif \inc == 4
.elseif \inc == 4
- \instr\cond\()t \reg, [\ptr], #\inc
+ \instr\cond\()
\
t \reg, [\ptr], #\inc
.else
.error "Unsupported inc macro argument"
.endif
.else
.error "Unsupported inc macro argument"
.endif