aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorIonut Nicu <ionut.nicu@freescale.com>2008-03-05 11:12:54 -0500
committerPaul Mackerras <paulus@samba.org>2008-04-06 23:49:19 -0400
commit221ac329e93fe2a676346af2e98e311251648f69 (patch)
treefda0c1f9ce619a3f34576a95e94b3385cc154fe3 /include/asm-powerpc
parent0119536cd314ef95553604208c25bc35581f7f0a (diff)
[POWERPC] Fix kernel panic in arch_arm_kprobe
The code in arch_arm_kprobe was trying to set a breakpoint which resulted in a page fault because the kernel text pages were write protected. Disable the write protect when CONFIG_KPROBES is defined. Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/pgtable-ppc32.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index 2c79f550272b..bd5b4011c53b 100644
--- a/include/asm-powerpc/pgtable-ppc32.h
+++ b/include/asm-powerpc/pgtable-ppc32.h
@@ -420,7 +420,8 @@ extern int icache_44x_need_flush;
420#define _PAGE_IO (_PAGE_KERNEL | _PAGE_NO_CACHE | _PAGE_GUARDED) 420#define _PAGE_IO (_PAGE_KERNEL | _PAGE_NO_CACHE | _PAGE_GUARDED)
421#define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC) 421#define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC)
422 422
423#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) 423#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
424 defined(CONFIG_KPROBES)
424/* We want the debuggers to be able to set breakpoints anywhere, so 425/* We want the debuggers to be able to set breakpoints anywhere, so
425 * don't write protect the kernel text */ 426 * don't write protect the kernel text */
426#define _PAGE_RAM_TEXT _PAGE_RAM 427#define _PAGE_RAM_TEXT _PAGE_RAM