From: ben.dooks@codethink.co.uk (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: Correct BUG() assembly to ensure it is endian-agnostic
Date: Wed, 14 Aug 2013 17:42:41 +0100 [thread overview]
Message-ID: <1376498563-8146-2-git-send-email-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <1376498563-8146-1-git-send-email-ben.dooks@codethink.co.uk>
Currently BUG() uses .word or .hword to create the necessary illegal
instructions. However if we are building BE8 then these get swapped
by the linker into different illegal instructions in the text.
Change to using .inst and .inst.w to create the instructions and mark
them as instructions so that the linker acts correctly.
Fixes issue reported by Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
arch/arm/include/asm/bug.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h
index 7af5c6c..b95da52 100644
--- a/arch/arm/include/asm/bug.h
+++ b/arch/arm/include/asm/bug.h
@@ -12,10 +12,10 @@
*/
#ifdef CONFIG_THUMB2_KERNEL
#define BUG_INSTR_VALUE 0xde02
-#define BUG_INSTR_TYPE ".hword "
+#define BUG_INSTR_TYPE ".inst.w "
#else
#define BUG_INSTR_VALUE 0xe7f001f2
-#define BUG_INSTR_TYPE ".word "
+#define BUG_INSTR_TYPE ".inst "
#endif
--
1.7.10.4
next prev parent reply other threads:[~2013-08-14 16:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 16:42 BE8 patch updates Ben Dooks
2013-08-14 16:42 ` Ben Dooks [this message]
2013-08-14 16:42 ` [PATCH 2/3] ARM: fix BUG() detection Ben Dooks
2013-08-15 15:09 ` Dave Martin
2013-08-16 8:31 ` Ben Dooks
2013-08-16 13:24 ` Dave Martin
2013-08-14 16:42 ` [PATCH 3/3] ARM: kdgb: use <asm/opcodes.h> for data to be assembled as intruction Ben Dooks
2013-08-15 15:53 ` Dave Martin
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=1376498563-8146-2-git-send-email-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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).