diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-07-25 15:27:33 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-28 02:30:47 -0400 |
commit | 2325f0a0c3d76bb515f3312ab2b16afdbffcc594 (patch) | |
tree | 69386c213a02b0900054cdcfcaf4372c3ec31a3e /arch/powerpc/kernel/ptrace.c | |
parent | d3b060231b2e1eb7e7e9680ff93326a4ae576720 (diff) |
powerpc/booke: Clean up the hardware watchpoint support
* CONFIG_BOOKE is selected by CONFIG_44x so we dont need both
* Fixed a few comments
* Go back to only using DBCR0_IDM to determine if we are using
debug resources.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index a5d0e78779c8..66204cb51a1a 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -717,7 +717,7 @@ void user_disable_single_step(struct task_struct *task) | |||
717 | struct pt_regs *regs = task->thread.regs; | 717 | struct pt_regs *regs = task->thread.regs; |
718 | 718 | ||
719 | 719 | ||
720 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | 720 | #if defined(CONFIG_BOOKE) |
721 | /* If DAC then do not single step, skip */ | 721 | /* If DAC then do not single step, skip */ |
722 | if (task->thread.dabr) | 722 | if (task->thread.dabr) |
723 | return; | 723 | return; |
@@ -744,10 +744,11 @@ int ptrace_set_debugreg(struct task_struct *task, unsigned long addr, | |||
744 | if (addr > 0) | 744 | if (addr > 0) |
745 | return -EINVAL; | 745 | return -EINVAL; |
746 | 746 | ||
747 | /* The bottom 3 bits in dabr are flags */ | ||
747 | if ((data & ~0x7UL) >= TASK_SIZE) | 748 | if ((data & ~0x7UL) >= TASK_SIZE) |
748 | return -EIO; | 749 | return -EIO; |
749 | 750 | ||
750 | #ifdef CONFIG_PPC64 | 751 | #ifndef CONFIG_BOOKE |
751 | 752 | ||
752 | /* For processors using DABR (i.e. 970), the bottom 3 bits are flags. | 753 | /* For processors using DABR (i.e. 970), the bottom 3 bits are flags. |
753 | * It was assumed, on previous implementations, that 3 bits were | 754 | * It was assumed, on previous implementations, that 3 bits were |
@@ -769,7 +770,7 @@ int ptrace_set_debugreg(struct task_struct *task, unsigned long addr, | |||
769 | task->thread.dabr = data; | 770 | task->thread.dabr = data; |
770 | 771 | ||
771 | #endif | 772 | #endif |
772 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | 773 | #if defined(CONFIG_BOOKE) |
773 | 774 | ||
774 | /* As described above, it was assumed 3 bits were passed with the data | 775 | /* As described above, it was assumed 3 bits were passed with the data |
775 | * address, but we will assume only the mode bits will be passed | 776 | * address, but we will assume only the mode bits will be passed |