From: Marc Zyngier <marc.zyngier@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Will Deacon <will.deacon@arm.com>
Subject: [RESEND PATCH 1/2] scripts/decodecode: Set ARCH when running natively on arm/arm64
Date: Mon, 10 Dec 2018 17:46:58 +0000 [thread overview]
Message-ID: <20181210174659.31054-2-marc.zyngier@arm.com> (raw)
In-Reply-To: <20181210174659.31054-1-marc.zyngier@arm.com>
When running decodecode natively on arm64, ARCH is likely not to be set,
and we end-up with .4byte instead of .inst when generating the disassembly.
Similar effects would occur if running natively on a 32bit ARM platform,
although that's even less popular.
A simple workaround is to populate ARCH when it is not set and that we're
running on an arm/arm64 system.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
scripts/decodecode | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/decodecode b/scripts/decodecode
index 9cef558528aa..ba8b8d5834e6 100755
--- a/scripts/decodecode
+++ b/scripts/decodecode
@@ -60,6 +60,13 @@ case $width in
4) type=4byte ;;
esac
+if [ -z "$ARCH" ]; then
+ case `uname -m` in
+ aarch64*) ARCH=arm64 ;;
+ arm*) ARCH=arm ;;
+ esac
+fi
+
disas() {
${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null 2>&1
--
2.19.1
next prev parent reply other threads:[~2018-12-10 17:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 17:46 [RESEND PATCH 0/2] scripts/decode{code,_stacktrace} fixes Marc Zyngier
2018-12-10 17:46 ` Marc Zyngier [this message]
2018-12-10 17:46 ` [RESEND PATCH 2/2] scripts/decode_stacktrace: Only strip base path when a prefix of the path Marc Zyngier
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=20181210174659.31054-2-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.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).