mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
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>
This commit is contained in:
parent
15420269b0
commit
9f80ccda53
2 changed files with 3 additions and 0 deletions
|
@ -288,6 +288,7 @@
|
|||
*/
|
||||
#define ALT_UP(instr...) \
|
||||
.pushsection ".alt.smp.init", "a" ;\
|
||||
.align 2 ;\
|
||||
.long 9998b - . ;\
|
||||
9997: instr ;\
|
||||
.if . - 9997b == 2 ;\
|
||||
|
@ -299,6 +300,7 @@
|
|||
.popsection
|
||||
#define ALT_UP_B(label) \
|
||||
.pushsection ".alt.smp.init", "a" ;\
|
||||
.align 2 ;\
|
||||
.long 9998b - . ;\
|
||||
W(b) . + (label - 9998b) ;\
|
||||
.popsection
|
||||
|
|
|
@ -96,6 +96,7 @@ unsigned long __get_wchan(struct task_struct *p);
|
|||
#define __ALT_SMP_ASM(smp, up) \
|
||||
"9998: " smp "\n" \
|
||||
" .pushsection \".alt.smp.init\", \"a\"\n" \
|
||||
" .align 2\n" \
|
||||
" .long 9998b - .\n" \
|
||||
" " up "\n" \
|
||||
" .popsection\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue