public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Chris Brandt <chris.brandt@renesas.com>
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop
Date: Wed, 8 May 2019 20:39:49 -0400	[thread overview]
Message-ID: <20190509003949.GO1747@sasha-vm> (raw)
In-Reply-To: <20190508185951.41148-1-chris.brandt@renesas.com>

On Wed, May 08, 2019 at 01:59:51PM -0500, Chris Brandt wrote:
>From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
>[ Upstream commit 60ce2858514ed9ccaf00dc7e9f4dc219537e9855 ]
>
>Commit 06a4b6d009a1 ("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: 06a4b6d009a1 ("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>
>Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
>---
>
>For the 4.9.x tree, commit 7b5407843691 was applied, but that caused
>an issue for CONFIG_THUMB2 builds as you can see in the commit
>message above.
>
>Therefore, this upstream fix (that came 2 weeks later) is also required
>in the 4.9.x tree to make it build again.

I've queued 60ce2858514 for 4.9, thanks!

--
Thanks,
Sasha

      reply	other threads:[~2019-05-09  0:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 18:59 [PATCH] ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop Chris Brandt
2019-05-09  0:39 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190509003949.GO1747@sasha-vm \
    --to=sashal@kernel.org \
    --cc=chris.brandt@renesas.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox