linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>,
	clang-built-linux@googlegroups.com,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: mtd-xip: work around clang/llvm bug
Date: Tue, 9 Jul 2019 13:48:11 +0200	[thread overview]
Message-ID: <CACRpkdZbEL7njJEO+0UYzzkck+UeMuADgB4Nwvet5B2ZALDcZQ@mail.gmail.com> (raw)
In-Reply-To: <20190709091747.cg3cqmzdfpzks2vx@shell.armlinux.org.uk>

On Tue, Jul 9, 2019 at 11:17 AM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
> On Tue, Jul 09, 2019 at 10:41:05AM +0200, Linus Walleij wrote:
> > I guess this brings up the old question whether the compiler should
> > be worked around or just considered immature, but as it happens this
> > other day I was grep:ing around to find "the 8 NOP" that is so
> > compulsively inserted in ARM executables (like at the very start of
> > the kernel execution)
>
> The NOPs at the start of the kernel executable have nothing what so ever
> to do with this.  They are there to align the kernel entry with the old
> a.out format that was used (which had a 32 byte header).  Consequently,
> there are boot loaders around that jump to 32 bytes into the kernel
> header.

Wow! Finally the puzzle pieces come together. And it makes a lot
of sense.

> There are other places that we insert 10 NOPs (at cpu_relax()) due to a
> CPU errata (otherwise a tight loop basically stalls other CPUs.)

Pretty interesting too!

I try to learn a bit more intrinsics of the Arm architecture (been doing
assembly experiments recent days) so getting to know things like
this is very valuable.

Yours,
Linus Walleij

  reply	other threads:[~2019-07-09 11:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 20:30 [PATCH] ARM: mtd-xip: work around clang/llvm bug Arnd Bergmann
2019-07-08 20:54 ` Nick Desaulniers
2019-07-09  8:41 ` Linus Walleij
2019-07-09  9:17   ` Russell King - ARM Linux admin
2019-07-09 11:48     ` Linus Walleij [this message]
2019-07-09 18:07   ` Nick Desaulniers
2019-07-09 18:40     ` Arnd Bergmann
2019-07-09 22:25       ` Russell King - ARM Linux admin
2019-07-10  8:33         ` Arnd Bergmann
2019-07-10  8:58           ` Russell King - ARM Linux admin
2019-07-09 12:17 ` Linus Walleij
2019-07-09 12:25   ` Russell King - ARM Linux admin
2019-07-09 18:11     ` Nick Desaulniers

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=CACRpkdZbEL7njJEO+0UYzzkck+UeMuADgB4Nwvet5B2ZALDcZQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=arnd@arndb.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).