summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>2014-01-10 13:15:05 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2014-01-10 17:51:35 +0000
commit65c021bb496a46ec06264e9d5e836dffa70ef380 (patch)
tree9b041ef9dbf4c3ab40299f5eb86b4cce15bd3545 /lib
parentf4be8433fc2f2361509e39f17b88c260da52a7cd (diff)
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>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions