Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

make Linux bootable on ARM again

Commit 200b812d00 "Clear the exclusive monitor when returning from an
exception" broke the vast majority of ARM systems in the wild which are
still pre ARMv6. The kernel is crashing on the first occurrence of an
exception due to the removal of the actual return instruction for them.
Let's add it back.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Nicolas Pitre and committed by
Linus Torvalds
9e6ec39b 6d7f18f6

+2
+2
arch/arm/kernel/entry-header.S
··· 83 83 ldr r0, [sp] 84 84 strex r1, r2, [sp] @ clear the exclusive monitor 85 85 ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr 86 + #else 87 + ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr 86 88 #endif 87 89 .endm 88 90