]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ARM: Correct BUG() assembly to ensure it is endian-agnostic
authorBen Dooks <ben.dooks@codethink.co.uk>
Thu, 25 Jul 2013 13:38:03 +0000 (14:38 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 12:13:37 +0000 (14:13 +0200)
commitc35d584129f4dcb1ef167427475e5452e456431e
tree40363a07442f4d92d323256478c57f7626542fda
parenta2752656378c13d38a719a67a05299950137f7da
ARM: Correct BUG() assembly to ensure it is endian-agnostic

commit 63328070eff2f4fd730c86966a0dbc976147c39f upstream.

Currently BUG() uses .word or .hword to create the necessary illegal
instructions. However if we are building BE8 then these get swapped
by the linker into different illegal instructions in the text. This
means that the BUG() macro does not get trapped properly.

Change to using <asm/opcodes.h> to provide the necessary ARM instruction
building as we cannot rely on gcc/gas having the `.inst` instructions
which where added to try and resolve this issue (reported by Dave Martin
<Dave.Martin@arm.com>).

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm/include/asm/bug.h
arch/arm/kernel/traps.c