linux-uconsole/arch/arc/kernel
Vineet Gupta 9b2c750d8e ARC: gdbserver breakage in Big-Endian configuration #1
[Based on mainline commit 502a0c775c: "ARC: pt_regs update #5"]

gdbserver needs @stop_pc, served by ptrace, but fetched from pt_regs
differently, based on in_brkpt_traps(), which in turn relies on
additional machine state in pt_regs->event bitfield.

        unsigned long orig_r8:16, event:16;

For big endian config, this macro was returning false, despite being in
breakpoint Trap exception, causing wrong @stop_pc to be returned to gdb.

Issue #1: In BE, @event above is at offset 2 in word, while a STW insn
          at offset 0 was used to update it. Resort to using ST insn
	  which updates the half-word at right location.

Issue #2: The union involving bitfields causes all the members to be
	  laid out at offset 0. So with fix #1 above, ASM was now
	  updating at offset 2, "C" code was still referencing at
	  offset 0. Fixed by wrapping bitfield in a struct.

Reported-by: Noam Camus <noamc@ezchip.com>
Tested-by: Anton Kolesov <akolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-29 09:47:29 -07:00
..
arc_hostlink.c ARC: Hostlink Pseudo-Driver for Metaware Debugger 2013-02-15 23:16:10 +05:30
arcksyms.c
asm-offsets.c ARC: Use <linux/*> headers instead of <asm/*> 2013-04-09 12:21:14 +05:30
clk.c ARC: fix typo with clock speed 2013-05-07 13:43:54 +05:30
ctx_sw.c ARC: SMP support 2013-02-15 23:16:02 +05:30
ctx_sw_asm.S ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
devtree.c ARC: make a copy of flat DT 2013-02-26 14:25:18 +05:30
disasm.c ARC port updates for Linux 3.10 (part 1) 2013-05-09 14:36:27 -07:00
entry.S ARC: gdbserver breakage in Big-Endian configuration #1 2013-08-29 09:47:29 -07:00
fpu.c ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
head.S ARC: SMP support 2013-02-15 23:16:02 +05:30
irq.c ARC: Prepare interrupt code for external controllers 2013-05-07 13:43:58 +05:30
kgdb.c ARC: make allyesconfig build breakages 2013-03-11 19:01:09 +05:30
kprobes.c ARC: Remove duplicate inclusion of header files 2013-04-09 12:21:15 +05:30
Makefile ARC: Hostlink Pseudo-Driver for Metaware Debugger 2013-02-15 23:16:10 +05:30
module.c ARC: Fix coding style issues 2013-04-09 12:21:14 +05:30
process.c arc: Use generic idle loop 2013-04-08 17:39:23 +02:00
ptrace.c ARC: ptrace support 2013-02-15 23:15:59 +05:30
reset.c ARC: Boot #1: low-level, setup_arch(), /proc/cpuinfo, mem init 2013-02-15 23:15:54 +05:30
setup.c ARC: [cmdline] Don't overwrite u-boot provided bootargs 2013-05-07 13:43:57 +05:30
signal.c ARC: [Review] Prevent incorrect syscall restarts 2013-02-15 23:15:50 +05:30
smp.c arc: Use generic idle loop 2013-04-08 17:39:23 +02:00
stacktrace.c dump_stack: consolidate dump_stack() implementations and unify their behaviors 2013-04-30 17:04:02 -07:00
sys.c ARC: ABIv3: fork/vfork wrappers not needed in "no-legacy-syscall" ABI 2013-03-11 19:01:10 +05:30
time.c ARC: Remove duplicate inclusion of header files 2013-04-09 12:21:15 +05:30
traps.c ARC: unaligned access emulation error handling consolidation 2013-05-07 13:43:55 +05:30
troubleshoot.c ARC port updates for Linux 3.10 (part 1) 2013-05-09 14:36:27 -07:00
unaligned.c ARC: Unaligned access emulation 2013-02-15 23:16:06 +05:30
unwind.c ARC: DWARF2 .debug_frame based stack unwinder 2013-02-15 23:16:03 +05:30
vmlinux.lds.S ARC: [Review] Multi-platform image #4: Isolate platform headers 2013-02-15 23:16:14 +05:30