linux/arch/arm/boot/compressed
Ard Biesheuvel 60ce285851 ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop
Commit 06a4b6d009 ("ARM: 8677/1: boot/compressed: fix decompressor
header layout for v7-M") fixed an issue in the layout of the header
of the compressed kernel image that was caused by the assembler
emitting narrow opcodes for 'mov r0, r0', and for this reason, the
mnemonic was updated to use the W() macro, which will append the .w
suffix (which forces a wide encoding) if required, i.e., when building
the kernel in Thumb2 mode.

However, this failed to take into account that on Thumb2 kernels built
for CPUs that are also ARM capable, the entry point is entered in ARM
mode, and so the instructions emitted here will be ARM instructions
that only exist in a wide encoding to begin with, which is why the
assembler rejects the .w suffix here and aborts the build with the
following message:

  head.S: Assembler messages:
  head.S:132: Error: width suffixes are invalid in ARM mode -- `mov.w r0,r0'

So replace the W(mov) with separate ARM and Thumb2 instructions, where
the latter will only be used for THUMB2_ONLY builds.

Fixes: 06a4b6d009 ("ARM: 8677/1: boot/compressed: fix decompressor ...")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2017-06-12 15:47:27 +01:00
..
.gitignore ARM: 8542/1: decompressor: merge piggy.*.S and simplify Makefile 2016-02-22 16:56:31 +00:00
atags_to_fdt.c ARM: 8025/1: Get rid of meminfo 2014-06-01 01:17:12 +01:00
big-endian.S
debug.S ARM: 7737/1: fix kernel decompressor compilation error with CONFIG_DEBUG_SEMIHOSTING 2013-06-05 23:32:24 +01:00
decompress.c ARM: 8654/1: decompressor: add strlen prototype 2017-02-28 11:06:18 +00:00
efi-header.S ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop 2017-06-12 15:47:27 +01:00
head-sa1100.S ARM: 7743/1: compressed/head.S: work around new binutils warning 2013-06-05 23:32:27 +01:00
head-sharpsl.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
head-xscale.S ARM: remove ixp23xx and ixp2000 platforms 2012-04-06 08:26:18 -05:00
head.S ARM: 8677/1: boot/compressed: fix decompressor header layout for v7-M 2017-06-05 10:29:40 +01:00
libfdt_env.h libfdt: add fdt type definitions 2015-04-29 17:17:17 -05:00
ll_char_wr.S
Makefile Merge branches 'amba', 'fixes', 'misc' and 'tauros2' into for-next 2016-03-04 23:36:02 +00:00
misc.c stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG 2013-12-20 09:38:40 +01:00
piggy.S ARM: 8542/1: decompressor: merge piggy.*.S and simplify Makefile 2016-02-22 16:56:31 +00:00
string.c ARM: boot: Add an implementation of strnlen for libfdt 2016-02-11 19:43:47 -06:00
vmlinux.lds.S ARM: add UEFI stub support 2015-12-14 10:38:21 +01:00