linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC v2 0/4] ARM: hw_breakpoint: Avoid undef instruction exceptions on wake-up
@ 2014-09-30 12:26 Geert Uytterhoeven
  2014-09-30 12:26 ` [PATCH/RFC v2 1/4] ARM: hw_breakpoint: Add arm_dbg_regs_available flag Geert Uytterhoeven
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2014-09-30 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

	Hi all,

If power area D4, which contains the Coresight-ETM hardware block, is
powered down on R-Mobile A1 (r8a7740), the kernel crashes when
suspending from s2ram with:

    Internal error: Oops - undefined instruction: 0 [#1] ARM

This happens because dbg_cpu_pm_notify() calls reset_ctrl_regs(), which
can't access the debug registers as the debug module is powered down.

As suggested by Russell King, track whether the ETM block is powered down
to fix this.

The availability of the debug registers depends on the platform and its
state.  Hence provide a mechanism for platform code to indicate that the
debug registers are available or not, using a boolean flag that
defaults to true.

This is an alternative solution for "[PATCH] ARM: hw_breakpoint: Trap undef
instruction exceptions on wake-up" (https://lkml.org/lkml/2014/9/17/190).

Thanks for your comments!

Geert Uytterhoeven (4):
  [RFC] ARM: hw_breakpoint: Add arm_dbg_regs_available flag
  [RFC] ARM: shmobile: r8a7740 legacy: Sync arm_dbg_regs_available with
    D4 PM domain
  [RFC] ARM: shmobile: R-Mobile: Sync arm_dbg_regs_available with D4 PM
    domain
  [RFC] ARM: shmobile: r8a7740 dtsi: Add minimal device node for
    Coresight-ETM

 arch/arm/boot/dts/r8a7740.dtsi       |  5 +++++
 arch/arm/include/asm/hw_breakpoint.h |  2 ++
 arch/arm/kernel/hw_breakpoint.c      |  7 +++++++
 arch/arm/mach-shmobile/pm-r8a7740.c  | 19 +++++++++++++++++++
 arch/arm/mach-shmobile/pm-rmobile.c  | 35 ++++++++++++++++++++++++++++++++---
 5 files changed, 65 insertions(+), 3 deletions(-)

-- 
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-01 20:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 12:26 [PATCH/RFC v2 0/4] ARM: hw_breakpoint: Avoid undef instruction exceptions on wake-up Geert Uytterhoeven
2014-09-30 12:26 ` [PATCH/RFC v2 1/4] ARM: hw_breakpoint: Add arm_dbg_regs_available flag Geert Uytterhoeven
2014-09-30 16:03   ` Will Deacon
2014-10-01  7:41     ` Geert Uytterhoeven
2014-10-01 14:38       ` Mathieu Poirier
2014-10-01 20:26         ` Geert Uytterhoeven
2014-09-30 12:26 ` [PATCH/RFC v2 2/4] ARM: shmobile: r8a7740 legacy: Sync arm_dbg_regs_available with D4 PM domain Geert Uytterhoeven
2014-09-30 12:26 ` [PATCH/RFC v2 3/4] ARM: shmobile: R-Mobile: " Geert Uytterhoeven
2014-09-30 12:26 ` [PATCH/RFC v2 4/4] ARM: shmobile: r8a7740 dtsi: Add minimal device node for Coresight-ETM Geert Uytterhoeven

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).