linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ben.dooks@codethink.co.uk (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: kdgb: use .inst for data to be assembled as intruction
Date: Thu, 25 Jul 2013 15:49:38 +0100	[thread overview]
Message-ID: <1374763778-5305-2-git-send-email-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <1374763778-5305-1-git-send-email-ben.dooks@codethink.co.uk>

The arch_kgdb_breakpoint() function uses an inline assembly directive
to assemble a specific instruction using .word. This means the linker
will not treat is as an instruction, and therefore incorrectly swap
the endian-ness if running BE8.

Note, not tested, please comment if this is wrong.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 arch/arm/include/asm/kgdb.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/kgdb.h b/arch/arm/include/asm/kgdb.h
index 48066ce..76227c8 100644
--- a/arch/arm/include/asm/kgdb.h
+++ b/arch/arm/include/asm/kgdb.h
@@ -41,7 +41,7 @@
 
 static inline void arch_kgdb_breakpoint(void)
 {
-	asm(".word 0xe7ffdeff");
+	asm(".inst 0xe7ffdeff");
 }
 
 extern void kgdb_handle_bus_error(void);
-- 
1.7.10.4

  reply	other threads:[~2013-07-25 14:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 14:49 kdgb fix Ben Dooks
2013-07-25 14:49 ` Ben Dooks [this message]
2013-07-25 16:02   ` [PATCH] ARM: kdgb: use .inst for data to be assembled as intruction Will Deacon
2013-07-25 17:11   ` Dave Martin
2013-07-25 17:13     ` Ben Dooks
2013-07-25 18:09       ` Dave Martin
2013-07-26 10:31         ` Ben Dooks
2013-07-26 14:59           ` 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=1374763778-5305-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).