ARM: allow 16-bit instructions in ALT_UP()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Apr 2015 11:59:35 +0000 (12:59 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 14 Apr 2015 21:26:51 +0000 (22:26 +0100)
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>
arch/arm/include/asm/assembler.h

index f67fd3afebdfd3fd46418d80d12dd31ea628936c..186270b3e1944351d8b168d25a379477748f9920 100644 (file)
        .pushsection ".alt.smp.init", "a"                       ;\
        .long   9998b                                           ;\
 9997:  instr                                                   ;\
+       .if . - 9997b == 2                                      ;\
+               nop                                             ;\
+       .endif                                                  ;\
        .if . - 9997b != 4                                      ;\
                .error "ALT_UP() content must assemble to exactly 4 bytes";\
        .endif                                                  ;\