powerpc/32: Enable HW_BREAKPOINT on BOOK3S
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 29 Nov 2016 08:52:13 +0000 (09:52 +0100)
committerScott Wood <oss@buserror.net>
Wed, 25 Jan 2017 08:43:56 +0000 (02:43 -0600)
BOOK3S also has DABR register and capability to handle data
breakpoints, so this patch enable it on all BOOK3S, not only 64 bits.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
arch/powerpc/Kconfig
arch/powerpc/include/asm/processor.h

index a8ee573fe610bd5e2d8191b4dffb05e134a6d3c2..1971ed4e033622074db231aa988cfbd1940af545 100644 (file)
@@ -113,7 +113,7 @@ config PPC
        select HAVE_PERF_REGS
        select HAVE_PERF_USER_STACK_DUMP
        select HAVE_REGS_AND_STACK_ACCESS_API
-       select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
+       select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S
        select ARCH_WANT_IPC_PARSE_VERSION
        select SPARSE_IRQ
        select IRQ_DOMAIN
index 1ba814436c73fffed84522b70c852d6990d7a686..2053a4b0914f1fda1475b73bcebe9f789533a1da 100644 (file)
@@ -225,6 +225,7 @@ struct thread_struct {
 #ifdef CONFIG_PPC64
        unsigned long   start_tb;       /* Start purr when proc switched in */
        unsigned long   accum_tb;       /* Total accumulated purr for process */
+#endif
 #ifdef CONFIG_HAVE_HW_BREAKPOINT
        struct perf_event *ptrace_bps[HBP_NUM];
        /*
@@ -233,7 +234,6 @@ struct thread_struct {
         */
        struct perf_event *last_hit_ubp;
 #endif /* CONFIG_HAVE_HW_BREAKPOINT */
-#endif
        struct arch_hw_breakpoint hw_brk; /* info on the hardware breakpoint */
        unsigned long   trap_nr;        /* last trap # on this thread */
        u8 load_fp;