diff options
-rw-r--r-- | Documentation/powerpc/ptrace.txt | 1 | ||||
-rw-r--r-- | arch/powerpc/include/uapi/asm/ptrace.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/powerpc/ptrace.txt b/Documentation/powerpc/ptrace.txt index f2a7a3919772..99c5ce88d0fe 100644 --- a/Documentation/powerpc/ptrace.txt +++ b/Documentation/powerpc/ptrace.txt | |||
@@ -40,6 +40,7 @@ features will have bits indicating whether there is support for: | |||
40 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x2 | 40 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x2 |
41 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x4 | 41 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x4 |
42 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x8 | 42 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x8 |
43 | #define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x10 | ||
43 | 44 | ||
44 | 2. PTRACE_SETHWDEBUG | 45 | 2. PTRACE_SETHWDEBUG |
45 | 46 | ||
diff --git a/arch/powerpc/include/uapi/asm/ptrace.h b/arch/powerpc/include/uapi/asm/ptrace.h index 66b9ca4ee94a..77d2ed35b111 100644 --- a/arch/powerpc/include/uapi/asm/ptrace.h +++ b/arch/powerpc/include/uapi/asm/ptrace.h | |||
@@ -211,6 +211,7 @@ struct ppc_debug_info { | |||
211 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002 | 211 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002 |
212 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004 | 212 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004 |
213 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008 | 213 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008 |
214 | #define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x0000000000000010 | ||
214 | 215 | ||
215 | #ifndef __ASSEMBLY__ | 216 | #ifndef __ASSEMBLY__ |
216 | 217 | ||
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 10ade3c0c88a..3b14d320e69f 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -1644,6 +1644,8 @@ long arch_ptrace(struct task_struct *child, long request, | |||
1644 | dbginfo.sizeof_condition = 0; | 1644 | dbginfo.sizeof_condition = 0; |
1645 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 1645 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
1646 | dbginfo.features = PPC_DEBUG_FEATURE_DATA_BP_RANGE; | 1646 | dbginfo.features = PPC_DEBUG_FEATURE_DATA_BP_RANGE; |
1647 | if (cpu_has_feature(CPU_FTR_DAWR)) | ||
1648 | dbginfo.features |= PPC_DEBUG_FEATURE_DATA_BP_DAWR; | ||
1647 | #else | 1649 | #else |
1648 | dbginfo.features = 0; | 1650 | dbginfo.features = 0; |
1649 | #endif /* CONFIG_HAVE_HW_BREAKPOINT */ | 1651 | #endif /* CONFIG_HAVE_HW_BREAKPOINT */ |