ARM: 9180/1: Thumb2: align ALT_UP() sections in modules sufficiently

When building for Thumb2, the .alt.smp.init sections that are emitted by
the ALT_UP() patching code may not be 32-bit aligned, even though the
fixup_smp_on_up() routine expects that. This results in alignment faults
at module load time, which need to be fixed up by the fault handler.

So let's align those sections explicitly, and prevent this from occurring.

Cc: <stable@vger.kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

authored by Ard Biesheuvel and committed by Russell King (Oracle) 9f80ccda 15420269

+3
+2
arch/arm/include/asm/assembler.h
··· 288 */ 289 #define ALT_UP(instr...) \ 290 .pushsection ".alt.smp.init", "a" ;\ 291 .long 9998b - . ;\ 292 9997: instr ;\ 293 .if . - 9997b == 2 ;\ ··· 300 .popsection 301 #define ALT_UP_B(label) \ 302 .pushsection ".alt.smp.init", "a" ;\ 303 .long 9998b - . ;\ 304 W(b) . + (label - 9998b) ;\ 305 .popsection
··· 288 */ 289 #define ALT_UP(instr...) \ 290 .pushsection ".alt.smp.init", "a" ;\ 291 + .align 2 ;\ 292 .long 9998b - . ;\ 293 9997: instr ;\ 294 .if . - 9997b == 2 ;\ ··· 299 .popsection 300 #define ALT_UP_B(label) \ 301 .pushsection ".alt.smp.init", "a" ;\ 302 + .align 2 ;\ 303 .long 9998b - . ;\ 304 W(b) . + (label - 9998b) ;\ 305 .popsection
+1
arch/arm/include/asm/processor.h
··· 96 #define __ALT_SMP_ASM(smp, up) \ 97 "9998: " smp "\n" \ 98 " .pushsection \".alt.smp.init\", \"a\"\n" \ 99 " .long 9998b - .\n" \ 100 " " up "\n" \ 101 " .popsection\n"
··· 96 #define __ALT_SMP_ASM(smp, up) \ 97 "9998: " smp "\n" \ 98 " .pushsection \".alt.smp.init\", \"a\"\n" \ 99 + " .align 2\n" \ 100 " .long 9998b - .\n" \ 101 " " up "\n" \ 102 " .popsection\n"