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