diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2013-07-25 15:47:40 +0100 |
---|---|---|
committer | Ben Dooks <ben.dooks@codethink.co.uk> | 2013-08-27 21:58:03 +0100 |
commit | eb4b597295f17aebad7beeb3e08174f957d9a591 (patch) | |
tree | 80781f8e858a9d42a1d76762cd0ed774e50dd9a2 | |
parent | 2e3d68f0a806349045966cbfddf53760f0e342a6 (diff) | |
download | linux-eb4b597295f17aebad7beeb3e08174f957d9a591.tar.gz |
ARM: kdgb: use <asm/opcodes.h> for data to be assembled as intruction
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.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-rw-r--r-- | arch/arm/include/asm/kgdb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/include/asm/kgdb.h b/arch/arm/include/asm/kgdb.h index 48066ce9ea34..0a9d5dd93294 100644 --- a/arch/arm/include/asm/kgdb.h +++ b/arch/arm/include/asm/kgdb.h @@ -11,6 +11,7 @@ #define __ARM_KGDB_H__ #include <linux/ptrace.h> +#include <asm/opcodes.h> /* * GDB assumes that we're a user process being debugged, so @@ -41,7 +42,7 @@ static inline void arch_kgdb_breakpoint(void) { - asm(".word 0xe7ffdeff"); + asm(__inst_arm(0xe7ffdeff)); } extern void kgdb_handle_bus_error(void); |