Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351154
b: refs/heads/master
c: 9a6eb31
h: refs/heads/master
v: v3
  • Loading branch information
Dietmar Eggemann authored and Will Deacon committed Jan 10, 2013
1 parent 84b9d6f commit bfe46ca
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57ba899731156ab01cdb7dae8d1fe6430ef4957c
refs/heads/master: 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
28 changes: 27 additions & 1 deletion trunk/arch/arm/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/perf_event.h>
#include <linux/hw_breakpoint.h>
#include <linux/smp.h>
#include <linux/cpu_pm.h>

#include <asm/cacheflush.h>
#include <asm/cputype.h>
Expand Down Expand Up @@ -1032,6 +1033,30 @@ static struct notifier_block __cpuinitdata dbg_reset_nb = {
.notifier_call = dbg_reset_notify,
};

#ifdef CONFIG_CPU_PM
static int dbg_cpu_pm_notify(struct notifier_block *self, unsigned long action,
void *v)
{
if (action == CPU_PM_EXIT)
reset_ctrl_regs(NULL);

return NOTIFY_OK;
}

static struct notifier_block __cpuinitdata dbg_cpu_pm_nb = {
.notifier_call = dbg_cpu_pm_notify,
};

static void __init pm_init(void)
{
cpu_pm_register_notifier(&dbg_cpu_pm_nb);
}
#else
static inline void pm_init(void)
{
}
#endif

static int __init arch_hw_breakpoint_init(void)
{
debug_arch = get_debug_arch();
Expand Down Expand Up @@ -1081,8 +1106,9 @@ static int __init arch_hw_breakpoint_init(void)
hook_ifault_code(FAULT_CODE_DEBUG, hw_breakpoint_pending, SIGTRAP,
TRAP_HWBKPT, "breakpoint debug exception");

/* Register hotplug notifier. */
/* Register hotplug and PM notifiers. */
register_cpu_notifier(&dbg_reset_nb);
pm_init();
return 0;
}
arch_initcall(arch_hw_breakpoint_init);
Expand Down

0 comments on commit bfe46ca

Please sign in to comment.