[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZbEL7njJEO+0UYzzkck+UeMuADgB4Nwvet5B2ZALDcZQ@mail.gmail.com>
Date: Tue, 9 Jul 2019 13:48:11 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc: Arnd Bergmann <arnd@...db.de>, clang-built-linux@...glegroups.com,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: mtd-xip: work around clang/llvm bug
On Tue, Jul 9, 2019 at 11:17 AM Russell King - ARM Linux admin
<linux@...linux.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
Powered by blists - more mailing lists