]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: fix alignment padding in assembly code
authorMarc Zyngier <Marc.Zyngier@arm.com>
Fri, 19 Oct 2012 16:33:27 +0000 (17:33 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Sat, 20 Oct 2012 10:12:01 +0000 (11:12 +0100)
commit7c1edf5eaff097c39ca70a79f332c903a465c620
tree7b4a24afc4942237d7d762a5117df1db02879dea
parentde96700ce04dd63207bc967956486e69940341c9
arm64: fix alignment padding in assembly code

An interesting effect of using the generic version of linkage.h
is that the padding is defined in terms of x86 NOPs, which can have
even more interesting effects when the assembly code looks like this:

ENTRY(func1)
mov x0, xzr
ENDPROC(func1)
// fall through
ENTRY(func2)
mov x0, #1
ret
ENDPROC(func2)

Admittedly, the code is not very nice. But having code from another
architecture doesn't look completely sane either.

The fix is to add arm64's version of linkage.h, which causes the insertion
of proper AArch64 NOPs.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/Kbuild
arch/arm64/include/asm/linkage.h [new file with mode: 0644]