From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-arm-kernel@lists.infradead.org,
Will Deacon <will.deacon@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>
Cc: Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
Rob Herring <robh@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Marc Zyngier <marc.zyngier@arm.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] arm64: relax assembly code alignment from 16 byte to 4 byte
Date: Thu, 31 Aug 2017 18:56:23 +0900 [thread overview]
Message-ID: <1504173383-8367-1-git-send-email-yamada.masahiro@socionext.com> (raw)
Aarch64 instructions must be word aligned. The current 16 byte
alignment is more than enough. Relax it into 4 byte alignment.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
I do not know why arm64 Linux requires 16 byte alignment.
I dug git-history of arch/arm64/include/asm/linkage.h
and the only commit I see is:
commit aeed41a9371ee02257b608eb06a9058507a7d0f4
Author: Marc Zyngier <Marc.Zyngier@arm.com>
Date: Fri Oct 19 17:33:27 2012 +0100
arm64: fix alignment padding in assembly code
It just opt out of the asm-generic variant to remove 0x90.
So, the amount of alignment might not be not optimized yet.
Please correct me if I am missing something.
arch/arm64/include/asm/linkage.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h
index 636c1bc..1b26629 100644
--- a/arch/arm64/include/asm/linkage.h
+++ b/arch/arm64/include/asm/linkage.h
@@ -1,7 +1,7 @@
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H
-#define __ALIGN .align 4
-#define __ALIGN_STR ".align 4"
+#define __ALIGN .align 2
+#define __ALIGN_STR ".align 2"
#endif
--
2.7.4
next reply other threads:[~2017-08-31 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 9:56 Masahiro Yamada [this message]
2017-08-31 10:23 ` [PATCH] arm64: relax assembly code alignment from 16 byte to 4 byte Lothar Waßmann
2017-08-31 10:38 ` Robin Murphy
2017-09-07 16:46 ` Catalin Marinas
2017-09-20 10:58 ` Masahiro Yamada
2017-09-20 12:19 ` Catalin Marinas
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=1504173383-8367-1-git-send-email-yamada.masahiro@socionext.com \
--to=yamada.masahiro@socionext.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=olof@lixom.net \
--cc=robh@kernel.org \
--cc=will.deacon@arm.com \
/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).