Re: [PATCH] ARM: mtd-xip: work around clang/llvm bug

From: Russell King - ARM Linux admin
Date: Tue Jul 09 2019 - 05:18:01 EST


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.

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.)

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up