Skip to content

Commit 89c6bc5

Browse files
author
Russell King
committed
ARM: allow 16-bit instructions in ALT_UP()
Allow ALT_UP() to cope with a 16-bit Thumb instruction by automatically inserting a following nop instruction. This allows us to care less about getting the assembler to emit a 32-bit thumb instruction. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 38e42f1 commit 89c6bc5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎arch/arm/include/asm/assembler.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@
237237
.pushsection ".alt.smp.init", "a" ;\
238238
.long 9998b ;\
239239
9997: instr ;\
240+
.if . - 9997b == 2 ;\
241+
nop ;\
242+
.endif ;\
240243
.if . - 9997b != 4 ;\
241244
.error "ALT_UP() content must assemble to exactly 4 bytes";\
242245
.endif ;\

0 commit comments

Comments
 (0)