linux/arch/arm64
Lorenzo Pieralisi 65c021bb49 arm64: kernel: restore HW breakpoint registers in cpu_suspend
When a CPU resumes from low-power, it restores HW breakpoint and
watchpoint slots through a CPU PM notifier. Since we want to enable
debugging as early as possible in the resume path, the mdscr content
is restored along the general purpose registers in the cpu_suspend API
and debug exceptions are reenabled when cpu_suspend returns. Since the
CPU PM notifier is run after a CPU has been resumed, we cannot expect
HW breakpoint registers to contain sane values till the notifier is run,
since the HW breakpoints registers content is unknown at reset; this means
that the CPU might run with debug exceptions enabled, mdscr restored but HW
breakpoint registers containing junk values that can trigger spurious
debug exceptions.

This patch fixes current HW breakpoints restore by moving the HW breakpoints
registers restoration to the cpu_suspend API, before the debug exceptions are
enabled. This way, as soon as the cpu_suspend function returns the
kernel can resume debugging with sane values in HW breakpoint registers.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-01-10 17:51:35 +00:00
..
boot arm64: dts: Reduce size of virtio block device for foundation model 2013-12-20 16:20:21 +00:00
configs arm64: defconfig: Enable CONFIG_PREEMPT by default 2013-11-05 10:03:53 +00:00
include arm64, jump label: optimize jump label implementation 2014-01-08 15:23:53 +00:00
kernel arm64: kernel: restore HW breakpoint registers in cpu_suspend 2014-01-10 17:51:35 +00:00
kvm Here are the 3.13 KVM changes. There was a lot of work on the PPC 2013-11-15 13:51:36 +09:00
lib arm64: use generic strnlen_user and strncpy_from_user functions 2013-12-19 17:43:06 +00:00
mm Merge tag 'arm64-suspend' of git://linux-arm.org/linux-2.6-lp into upstream 2013-12-19 17:57:51 +00:00
xen xen/arm,arm64: enable SWIOTLB_XEN 2013-10-10 13:40:44 +00:00
Kconfig arm64, jump label: optimize jump label implementation 2014-01-08 15:23:53 +00:00
Kconfig.debug arm64: Remove duplicate DEBUG_STACK_USAGE config 2013-10-02 18:03:26 +01:00
Makefile arm64: big-endian: add big-endian support to top-level arch Makefile 2013-10-25 15:59:31 +01:00